Spaces:
Paused
Paused
File size: 489 Bytes
60dfd28 7b1f500 c8f5f98 b4b3424 7b1f500 b4b3424 7b1f500 637b36c c8f5f98 7b1f500 b4b3424 c8f5f98 7b1f500 b4b3424 c8f5f98 b4b3424 8a49d3e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | FROM python:3.11-slim
# Prepare environment
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Core dependencies
COPY --chown=user backend/requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Base source
COPY --chown=user backend/ .
# Network configuration
ENV PORT=7860
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers --forwarded-allow-ips '*'"]
|