Spaces:
Sleeping
Sleeping
Download Dockerfile from DIVYA-NSHU99/disk: direct link, hf CLI and curl.
- Browser
- Download file 776 Bytes
-
https://huggingface.co/spaces/DIVYA-NSHU99/disk/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DIVYA-NSHU99/disk/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DIVYA-NSHU99/disk/resolve/main/Dockerfile
776 Bytes
| # Use official Python slim image | |
| FROM python:3.10-slim | |
| # ---- Set cache directories FIRST ---- | |
| ENV HF_HOME=/tmp/.cache/huggingface \ | |
| TRANSFORMERS_CACHE=/tmp/.cache/huggingface \ | |
| SENTENCE_TRANSFORMERS_HOME=/tmp/.cache/sentence-transformers \ | |
| SPACY_DATA=/tmp/.cache/spacy \ | |
| NLTK_DATA=/tmp/.cache/nltk | |
| # ---- Set working directory ---- | |
| WORKDIR /app | |
| # ---- Copy requirements first (for Docker layer caching) ---- | |
| COPY requirements.txt . | |
| # ---- Install Python dependencies ---- | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ---- Copy the rest of the application ---- | |
| COPY . . | |
| # ---- Expose the port Hugging Face Spaces expects ---- | |
| EXPOSE 7860 | |
| # ---- Start the FastAPI server ---- | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |