CoolFace
Apppublic

Anushka-stack-queues/FinBench

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile58 linesDownload Raw Back to root
1# Copyright (c) Meta Platforms, Inc. and affiliates.2# All rights reserved.3#4# This source code is licensed under the BSD-style license found in the5# LICENSE file in the root directory of this source tree.6 7ARG BASE_IMAGE=ghcr.io/meta-pytorch/openenv-base:latest8FROM ${BASE_IMAGE} AS builder9 10WORKDIR /app11 12RUN apt-get update && \13    apt-get install -y --no-install-recommends git && \14    rm -rf /var/lib/apt/lists/*15 16ARG BUILD_MODE=in-repo17ARG ENV_NAME=FinBench18 19COPY . /app/env20WORKDIR /app/env21 22RUN if ! command -v uv >/dev/null 2>&1; then \23        curl -LsSf https://astral.sh/uv/install.sh | sh && \24        mv /root/.local/bin/uv /usr/local/bin/uv && \25        mv /root/.local/bin/uvx /usr/local/bin/uvx; \26    fi27 28RUN --mount=type=cache,target=/root/.cache/uv \29    if [ -f uv.lock ]; then \30        uv sync --frozen --no-install-project --no-editable; \31    else \32        uv sync --no-install-project --no-editable; \33    fi34 35RUN --mount=type=cache,target=/root/.cache/uv \36    if [ -f uv.lock ]; then \37        uv sync --frozen --no-editable; \38    else \39        uv sync --no-editable; \40    fi41 42FROM ${BASE_IMAGE}43 44WORKDIR /app45 46COPY --from=builder /app/env/.venv /app/.venv47COPY --from=builder /app/env /app/env48 49ENV PATH="/app/.venv/bin:$PATH"50ENV PYTHONPATH="/app/env:$PYTHONPATH"51ENV ENABLE_WEB_INTERFACE=true52 53HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \54    CMD curl -f http://localhost:8000/health || exit 155 56CMD ["sh", "-c", "cd /app/env && uvicorn FinBench.server.app:app --host 0.0.0.0 --port 8000"]57 58