Spaces:
Paused
Paused
| # HuggingFace optimized Dockerfile | |
| FROM python:3.9 | |
| # Create user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy and install requirements | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy application | |
| COPY --chown=user . /app | |
| # Run app | |
| CMD ["python", "app.py"] | |