hackeracademy commited on
Commit
95ee2a7
·
1 Parent(s): e02f5d0

Dockerfile updated: Use Alpine + musl for llama-cpp-python CPU wheel

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -5
Dockerfile CHANGED
@@ -1,13 +1,20 @@
1
- FROM python:3.11-slim
 
2
 
3
- # Install runtime deps for llama-cpp-python
4
- RUN apt-get update && apt-get install -y --no-install-recommends \
5
- libgomp1 curl ca-certificates && \
6
- rm -rf /var/lib/apt/lists/*
 
 
7
 
 
8
  WORKDIR /app
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
 
 
11
  COPY . .
 
12
  EXPOSE 7860
13
  CMD ["python", "-u", "app.py"]
 
1
+ # ---- 1. Base image that already has musl ----
2
+ FROM python:3.11-alpine
3
 
4
+ # ---- 2. System deps for llama-cpp-python (CPU) ----
5
+ RUN apk add --no-cache \
6
+ build-base \
7
+ libffi-dev \
8
+ cmake \
9
+ git
10
 
11
+ # ---- 3. Python deps ----
12
  WORKDIR /app
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # ---- 4. Copy rest of the code ----
17
  COPY . .
18
+
19
  EXPOSE 7860
20
  CMD ["python", "-u", "app.py"]