Spaces:
Sleeping
Sleeping
| # Full stack: PyTorch, TRL, PEFT, etc. — large downloads (often 30–90+ min on first build). | |
| # Use only when you need training or local HF weights inside the image. | |
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| CODE_PROVIDER_MODE=offline | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements-core.txt requirements.txt requirements-train.txt ./ | |
| RUN pip install --upgrade pip && \ | |
| pip install -r requirements.txt -r requirements-train.txt | |
| COPY . . | |
| RUN mkdir -p data logs models outputs | |
| EXPOSE 7860 8000 | |
| CMD ["python", "app.py"] | |