Spaces:
Configuration error
Configuration error
File size: 903 Bytes
06b1356 6d20eab 06b1356 8f4e94b de5a0fa 06b1356 8f4e94b de5a0fa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # ---- deps stage: needs git + a credentialed clone of the private ARF repos
# (agentic_reliability_framework, ARF-Bayesian-Pricing-Calculator).
# This stage is discarded after build -- the credential never reaches
# the final image's layers, env, or git config. ----
FROM python:3.12-slim AS deps
ARG GH_PAT
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN git config --global url."https://${GH_PAT}@github.com/".insteadOf "https://github.com/"
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# ---- final stage: just the built venv + app code, no git, no credential ----
FROM python:3.12-slim
COPY --from=deps /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
WORKDIR /app
COPY . .
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|