Spaces:
Sleeping
Sleeping
| # Dockerfile | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # 1. Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 3. Copy all source code | |
| COPY . . | |
| # 4. Expose port | |
| ENV PORT=7860 | |
| EXPOSE $PORT | |
| # 5. Run app | |
| CMD ["python", "app.py"] | |