nihardon commited on
Commit
99c9e3a
·
verified ·
1 Parent(s): 23089f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -8
Dockerfile CHANGED
@@ -1,28 +1,21 @@
1
- # 1. Use Python 3.9 Slim (Good choice)
2
  FROM python:3.9-slim
3
 
4
- # 2. Install system libraries (Required for the AI engine)
5
  RUN apt-get update && apt-get install -y \
6
  ca-certificates \
7
  libstdc++6 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # 3. Upgrade pip tools
11
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel
12
 
13
- # 4. SAFETY LOCK: Prevent compiling (Crucial for speed)
14
  ENV PIP_ONLY_BINARY=:all:
15
 
16
- # 5. THE FIX: Install llama-cpp-python using the CPU Wheel Server
17
- # We added '--extra-index-url' so it knows where to find the file.
18
  RUN pip install --no-cache-dir \
19
  llama-cpp-python==0.2.48 \
20
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
21
 
22
- # 6. Install the rest (Pinned to prevent the "HfFolder" crash)
23
  RUN pip install --no-cache-dir "huggingface_hub<0.25.0" gradio
24
 
25
- # 7. Run
26
  WORKDIR /app
27
  COPY . .
28
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  ca-certificates \
5
  libstdc++6 \
6
  && rm -rf /var/lib/apt/lists/*
7
 
 
8
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel
9
 
10
+ # Prevent compiling
11
  ENV PIP_ONLY_BINARY=:all:
12
 
 
 
13
  RUN pip install --no-cache-dir \
14
  llama-cpp-python==0.2.48 \
15
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
16
 
 
17
  RUN pip install --no-cache-dir "huggingface_hub<0.25.0" gradio
18
 
 
19
  WORKDIR /app
20
  COPY . .
21
  CMD ["python", "app.py"]