Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # The user will only upload app.zip and this Dockerfile | |
| COPY app.zip . | |
| # Install unzip, extract the application, and clean up the zip file | |
| # (also install build-essential for tokenizer dependencies) | |
| RUN apt-get update && apt-get install -y --no-install-recommends unzip build-essential && \ | |
| unzip -o app.zip && rm app.zip && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| ENV HF_HOME=/app/cache | |
| RUN python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('unsloth/Llama-3.2-3B-Instruct')" | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "--preload", "--timeout", "120", "-w", "4", "-b", "0.0.0.0:7860", "app:app"] | |