Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| WORKDIR /home/user/app | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user:user gateway.py . | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn gateway:app --host 0.0.0.0 --port ${PORT:-7860}"] | |