nihardon commited on
Commit
fdd3288
·
verified ·
1 Parent(s): 47a34d9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- FROM python:3.10
2
 
3
- RUN pip install --upgrade pip
 
4
 
5
- # Install the pre-built wheel
 
 
6
  RUN pip install --no-cache-dir \
7
  llama-cpp-python \
8
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
9
 
10
- # Install other dependencies
11
  RUN pip install --no-cache-dir \
12
  huggingface_hub \
13
  gradio
14
 
15
- # Copy and Run
16
  WORKDIR /app
17
  COPY . .
18
  CMD ["python", "app.py"]
 
1
+ FROM python:3.9
2
 
3
+ # 2. Upgrade pip to ensure it can see the wheels
4
+ RUN pip install --no-cache-dir --upgrade pip
5
 
6
+ # 3. Install llama-cpp-python
7
+ # We use '--prefer-binary' to FORCE it to download the wheel
8
+ # We use the CPU-specific URL
9
  RUN pip install --no-cache-dir \
10
  llama-cpp-python \
11
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
12
+ --prefer-binary
13
 
14
+ # 4. Install other dependencies
15
  RUN pip install --no-cache-dir \
16
  huggingface_hub \
17
  gradio
18
 
19
+ # 5. Set up the app
20
  WORKDIR /app
21
  COPY . .
22
  CMD ["python", "app.py"]