Spaces:
Runtime error
Runtime error
FROM python:3.9-slim | |
# Non‑root user | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV PATH="/home/user/.local/bin:$PATH" | |
WORKDIR /home/user/app | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
COPY . . | |
# Option‑1: rely on Space secret named HF_TOKEN | |
# Option‑2 (not recommended): uncomment to bake your token in the image | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |