nihardon commited on
Commit
deb3d1c
·
verified ·
1 Parent(s): 0858f84

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -1,17 +1,21 @@
 
1
  FROM python:3.9
2
 
 
3
  RUN pip install --no-cache-dir --upgrade pip
4
 
 
5
  RUN pip install "huggingface_hub<0.25.0"
6
 
 
 
7
  RUN pip install --no-cache-dir \
8
- llama-cpp-python \
9
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
10
- --prefer-binary
11
 
 
12
  RUN pip install --no-cache-dir gradio
13
 
14
- # Set up the app
15
  WORKDIR /app
16
  COPY . .
17
  CMD ["python", "app.py"]
 
1
+ # 1. Use Python 3.9 (Standard Debian-based image)
2
  FROM python:3.9
3
 
4
+ # 2. Upgrade pip (Just in case)
5
  RUN pip install --no-cache-dir --upgrade pip
6
 
7
+ # 3. Install the specific Hugging Face version (To prevent the HfFolder crash)
8
  RUN pip install "huggingface_hub<0.25.0"
9
 
10
+ # 4. CRITICAL FIX: Direct URL Install for the 'Manylinux' (glibc) wheel
11
+ # We use version 0.2.77 which is stable and compatible with CPU
12
  RUN pip install --no-cache-dir \
13
+ https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.77/llama_cpp_python-0.2.77-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
 
 
14
 
15
+ # 5. Install Gradio
16
  RUN pip install --no-cache-dir gradio
17
 
18
+ # 6. Set up the App
19
  WORKDIR /app
20
  COPY . .
21
  CMD ["python", "app.py"]