Spaces:
Sleeping
Sleeping
File size: 656 Bytes
c96707a faeab97 ccbc4b8 c96707a ccbc4b8 faeab97 ccbc4b8 faeab97 ccbc4b8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 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"] |