Spaces:
Runtime error
Runtime error
Download Dockerfile from devil2810/roberta-sentiment-analyzer: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/devil2810/roberta-sentiment-analyzer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/devil2810/roberta-sentiment-analyzer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/devil2810/roberta-sentiment-analyzer/resolve/main/Dockerfile
457 Bytes
| # Use official slim Python image | |
| FROM python:3.8-slim | |
| WORKDIR /app | |
| # Copy project files | |
| COPY . /app | |
| # Upgrade pip and install dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # Expose port used by HF Spaces Docker (default 7860) | |
| EXPOSE 7860 | |
| # Set environment variables for Hugging Face cache | |
| ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers | |
| ENV HF_HOME=/tmp/huggingface | |
| # Start the Flask app | |
| CMD ["python", "app.py"] | |