Download Dockerfile from adbeg/Bega-AI: direct link, hf CLI and curl.
- Browser
- Download file 908 Bytes
-
https://huggingface.co/spaces/adbeg/Bega-AI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/adbeg/Bega-AI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/adbeg/Bega-AI/resolve/main/Dockerfile
908 Bytes
| FROM python:3.9 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV CMAKE_ARGS="-DGGML_OPENMP=off" | |
| ENV FORCE_CMAKE=1 | |
| WORKDIR /app | |
| # Téléchargement direct et robuste du modèle (2.4 Go) pendant la construction de l'image Docker | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| wget -O llama-3.1-8B-Q2_K.gguf "https://huggingface.co/bartowski/Meta-Llama-3.1-8B-Instruct-GGUF/resolve/main/Meta-Llama-3.1-8B-Instruct-Q2_K.gguf" | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| COPY --chown=user . /app | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| wget -O llama-3.1-8B-Q2_K.gguf "https://huggingface.co/bartowski/Meta-Llama-3.1-8B-Instruct-GGUF/resolve/main/Meta-Llama-3.1-8B-Instruct-Q2_K.gguf" | |
| # Forcer le telechargement 1 |