Download Dockerfile from nvikou/prisme: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/spaces/nvikou/prisme/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nvikou/prisme/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nvikou/prisme/resolve/main/Dockerfile
1.26 kB
| # Prisme — RAG multimodal (Hugging Face Space, SDK Docker, CPU gratuit) | |
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ffmpeg libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face exécute le conteneur avec l'utilisateur 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| TIKTOKEN_CACHE_DIR=/home/user/.cache/tiktoken | |
| WORKDIR /home/user/app | |
| # PyTorch CPU (image beaucoup plus légère que la version CUDA) | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --user torch --index-url https://download.pytorch.org/whl/cpu \ | |
| && pip install --user -r requirements.txt | |
| # Téléchargement des modèles au build : démarrage rapide du Space | |
| RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('intfloat/multilingual-e5-base')" \ | |
| && python -c "import tiktoken; tiktoken.get_encoding('o200k_base')" | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"] | |