Commit
·
95ee2a7
1
Parent(s):
e02f5d0
Dockerfile updated: Use Alpine + musl for llama-cpp-python CPU wheel
Browse files- Dockerfile +12 -5
Dockerfile
CHANGED
@@ -1,13 +1,20 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
-
RUN
|
5 |
-
|
6 |
-
|
|
|
|
|
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"]
|