omjhamtani77 commited on
Commit
67dad89
·
verified ·
1 Parent(s): 655ef2b

Optimize build speed

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -1,16 +1,18 @@
1
  FROM python:3.10-slim
2
 
3
- # Install core system dependencies
4
- RUN apt-get update && apt-get install -y wget build-essential
5
 
6
- # Install llama-cpp-python with its native OpenAI-compatible API layer
7
- RUN pip install llama-cpp-python[server] huggingface_hub
 
 
8
 
9
- # Download your custom J.A.R.V.I.S. model weights directly into the container
10
  RUN wget https://huggingface.co/omjhamtani77/Jarvis-3B-Core/resolve/main/jarvis.gguf -O model.gguf
11
 
12
  # Expose the standard routing port Hugging Face reads
13
  EXPOSE 7860
14
 
15
- # Boot up the server engine with a standard context frame size
16
  CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "2048"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install wget to download the model file (removed heavy build-essential tools)
4
+ RUN apt-get update && apt-get install -y wget
5
 
6
+ # Install llama-cpp-python using a pre-compiled CPU wheel to bypass the compilation wait time
7
+ RUN pip install --upgrade pip
8
+ RUN pip install llama-cpp-python[server] --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
9
+ RUN pip install huggingface_hub
10
 
11
+ # Download your custom J.A.R.V.I.S. model weights straight into the container
12
  RUN wget https://huggingface.co/omjhamtani77/Jarvis-3B-Core/resolve/main/jarvis.gguf -O model.gguf
13
 
14
  # Expose the standard routing port Hugging Face reads
15
  EXPOSE 7860
16
 
17
+ # Boot up the server engine with a standard 2048 context window
18
  CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "2048"]