Spaces:
Running
Running
Download Dockerfile from aseelflihan/BioRAG: direct link, hf CLI and curl.
- Browser
- Download file 692 Bytes
-
https://huggingface.co/spaces/aseelflihan/BioRAG/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aseelflihan/BioRAG/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aseelflihan/BioRAG/resolve/main/Dockerfile
692 Bytes
| FROM python:3.10-slim | |
| RUN useradd -m -u 1000 user | |
| RUN apt-get update && apt-get install -y --no-install-recommends build-essential git && rm -rf /var/lib/apt/lists/* | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV HF_HOME="/home/user/.cache/huggingface" | |
| ENV HF_HUB_DISABLE_SYMLINKS_WARNING=1 | |
| WORKDIR /app | |
| # Install dependencies first (cached layer) | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy all code | |
| COPY --chown=user . /app | |
| # Pre-download models and build index during Docker build | |
| # This means startup will be fast (seconds, not hours) | |
| RUN python startup.py | |
| EXPOSE 7860 | |
| CMD ["python", "web_app.py"] |