Spaces:
Sleeping
Sleeping
Download Dockerfile from Manu4linux/gemma: direct link, hf CLI and curl.
- Browser
- Download file 656 Bytes
-
https://huggingface.co/spaces/Manu4linux/gemma/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Manu4linux/gemma/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Manu4linux/gemma/resolve/main/Dockerfile
656 Bytes
| # 1. Use the highly optimized C++ server from the NEW official registry | |
| FROM ghcr.io/ggml-org/llama.cpp:server | |
| # 2. Expose the port Hugging Face expects for web traffic | |
| EXPOSE 7860 | |
| # 3. Download the model natively using Docker's ADD command. | |
| # This bypasses the need for apt-get entirely and assigns the correct permissions! | |
| ADD --chown=1000:1000 https://huggingface.co/bartowski/gemma-2-2b-it-GGUF/resolve/main/gemma-2-2b-it-Q4_K_M.gguf /models/gemma-2b.gguf | |
| # Switch to the non-root user required by Hugging Face Spaces | |
| USER 1000 | |
| # 4. Boot the server | |
| CMD ["-m", "/models/gemma-2b.gguf", "--host", "0.0.0.0", "--port", "7860", "-t", "2", "-c", "2048"] |