Spaces:
Paused
Paused
| FROM python:3.10 | |
| # Create a user with home directory | |
| RUN useradd -m -u 1000 user | |
| # Set environment variables | |
| ENV HOME=/home/user | |
| ENV PATH=/home/user/.local/bin:$PATH | |
| # Switch to the new user | |
| USER user | |
| # Set working directory | |
| WORKDIR $HOME/app | |
| # Clone the repository directly (public repo) | |
| RUN git clone https://github.com/viratxd/deepseek2api.git | |
| # Change working directory to the cloned repo | |
| WORKDIR $HOME/app/deepseek2api | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Expose the desired port | |
| EXPOSE 7860 | |
| # Run the application using Uvicorn on port 7860 and listen on 0.0.0.0 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |