CyberCoder225 commited on
Commit
36de5b9
·
verified ·
1 Parent(s): c01d256

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -1,8 +1,10 @@
1
- # Use Python 3.10 on Debian (Standard for pre-built wheels)
2
- FROM python:3.10-slim
3
 
4
- # Install ONLY the runtime math library (libgomp1)
5
  RUN apt-get update && apt-get install -y \
 
 
6
  libgomp1 \
7
  && rm -rf /var/lib/apt/lists/*
8
 
@@ -12,13 +14,14 @@ ENV HOME=/home/user \
12
  PATH=/home/user/.local/bin:$PATH
13
  WORKDIR $HOME/app
14
 
15
- # Force-install the PRE-BUILT wheel so we DON'T "Build Wheel"
16
- # We use the 'manylinux' version which is a universal binary
17
- RUN pip install --no-cache-dir \
 
18
  flask \
19
  flask-cors \
20
  huggingface-hub \
21
- llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
22
 
23
  COPY --chown=user . $HOME/app
24
 
 
1
+ # Use Bookworm (Debian 12) - it's more stable for AI builds than Slim
2
+ FROM python:3.10-bookworm
3
 
4
+ # Install basic build tools and libraries
5
  RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ cmake \
8
  libgomp1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
14
  PATH=/home/user/.local/bin:$PATH
15
  WORKDIR $HOME/app
16
 
17
+ # We install a specific stable version (0.3.2) that has wide wheel support
18
+ # This avoids the "Building Wheel" trap.
19
+ RUN pip install --no-cache-dir --upgrade pip && \
20
+ pip install --no-cache-dir \
21
  flask \
22
  flask-cors \
23
  huggingface-hub \
24
+ llama-cpp-python==0.3.2 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
25
 
26
  COPY --chown=user . $HOME/app
27