Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -3,9 +3,10 @@ FROM python:3.12-slim
|
|
| 3 |
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
-
#
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
-
|
|
|
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Workdir
|
|
@@ -15,8 +16,8 @@ WORKDIR /app
|
|
| 15 |
COPY requirements.txt /app/requirements.txt
|
| 16 |
RUN pip install --upgrade pip && \
|
| 17 |
pip install --no-cache-dir -r requirements.txt && \
|
| 18 |
-
|
| 19 |
-
pip install --no-cache-dir
|
| 20 |
|
| 21 |
# App
|
| 22 |
COPY app.py /app/app.py
|
|
|
|
| 3 |
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
+
# Build & runtime deps for llama-cpp-python (CPU, OpenBLAS)
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
+
build-essential cmake git curl ca-certificates \
|
| 9 |
+
libopenblas-dev && \
|
| 10 |
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Workdir
|
|
|
|
| 16 |
COPY requirements.txt /app/requirements.txt
|
| 17 |
RUN pip install --upgrade pip && \
|
| 18 |
pip install --no-cache-dir -r requirements.txt && \
|
| 19 |
+
CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" \
|
| 20 |
+
pip install --no-cache-dir llama-cpp-python==0.2.90
|
| 21 |
|
| 22 |
# App
|
| 23 |
COPY app.py /app/app.py
|