Spaces:
Paused
Paused
| # Use Python 3.13 slim image as base | |
| FROM python:3.10 | |
| # Set up a new user named 'user' | |
| RUN useradd user | |
| USER user | |
| # Set home to the user's home directory | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME/app | |
| COPY --chown=user ./ $HOME/app | |
| RUN pip install -r requirements.txt | |
| RUN pip install --upgrade transformers | |
| # Set the default command to run the FastAPI app with Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |