Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Install system dependencies | |
| # fonts-wqy-microhei is a good open source Chinese font | |
| RUN apt-get update && apt-get install -y \ | |
| fonts-liberation \ | |
| fonts-wqy-microhei \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create user with ID 1000 for Hugging Face Spaces | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Set ownership to user 1000 | |
| RUN chown -R user:user /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |