Spaces:
Sleeping
Sleeping
| # Use python image | |
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the server code | |
| COPY app.py . | |
| # Create a non-root user for security (required by HF) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Run the application | |
| CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"] |