Spaces:
Runtime error
Runtime error
Download Dockerfile from nagaananth/space: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/spaces/nagaananth/space/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nagaananth/space/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nagaananth/space/resolve/main/Dockerfile
508 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install dependencies first (to cache this layer) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pre-download the model so it's baked into the image | |
| # This prevents the container from downloading it at runtime | |
| RUN python -c "from transformers import pipeline; pipeline('sentiment-analysis', model='distilbert-base-uncased-finetuned-sst-2-english')" | |
| COPY . . | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |