BaoKhuong commited on
Commit
66f2ea4
·
verified ·
1 Parent(s): 62a0350

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -3,9 +3,10 @@ FROM python:3.12-slim
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # Runtime deps for OpenBLAS (no full build toolchain to speed up)
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
- libopenblas-dev curl ca-certificates && \
 
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
- pip install --no-cache-dir --only-binary=:all: llama-cpp-python==0.2.90 || \
19
- pip install --no-cache-dir --prefer-binary llama-cpp-python==0.2.90
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