Andrew McCracken commited on
Commit
6e61395
·
1 Parent(s): 2fb680d

Optimize: Use pre-built llama-cpp-python wheels for faster builds

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -0
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -7,10 +7,16 @@ RUN apt-get update && apt-get install -y \
7
  gcc \
8
  g++ \
9
  make \
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  # Copy requirements and install
13
  COPY requirements.txt .
 
 
 
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
  # Copy application code
 
7
  gcc \
8
  g++ \
9
  make \
10
+ wget \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Copy requirements and install
14
  COPY requirements.txt .
15
+
16
+ # Install llama-cpp-python with pre-built wheels (much faster)
17
+ RUN pip install --no-cache-dir llama-cpp-python==0.3.14 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
18
+
19
+ # Install remaining requirements
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy application code
requirements.txt CHANGED
@@ -37,7 +37,7 @@ joblib==1.5.1
37
  jsonschema==4.25.0
38
  jsonschema-specifications==2025.4.1
39
  kubernetes==33.1.0
40
- llama_cpp_python==0.3.14
41
  markdown-it-py==3.0.0
42
  MarkupSafe==3.0.2
43
  mdurl==0.1.2
 
37
  jsonschema==4.25.0
38
  jsonschema-specifications==2025.4.1
39
  kubernetes==33.1.0
40
+ # llama_cpp_python is installed separately with pre-built wheels in Dockerfile
41
  markdown-it-py==3.0.0
42
  MarkupSafe==3.0.2
43
  mdurl==0.1.2