Fola-AI commited on
Commit
1143731
·
1 Parent(s): 3d5012a

Use jllllll pre-built wheels for llama-cpp-python

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -9,13 +9,9 @@ ENV HOST=0.0.0.0
9
  ENV PORT=7860
10
  ENV DEBIAN_FRONTEND=noninteractive
11
 
12
- # llama-cpp-python CUDA environment variables
13
- ENV CMAKE_ARGS="-DGGML_CUDA=on"
14
- ENV FORCE_CMAKE=1
15
-
16
  WORKDIR /app
17
 
18
- # Install system dependencies including build tools for llama-cpp-python
19
  RUN apt-get update && apt-get install -y --no-install-recommends \
20
  ffmpeg \
21
  libsm6 \
@@ -24,8 +20,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
  libglib2.0-0 \
25
  git \
26
  curl \
27
- build-essential \
28
- cmake \
29
  && rm -rf /var/lib/apt/lists/*
30
 
31
  # Upgrade pip
@@ -37,10 +31,10 @@ RUN pip install "numpy<2.0"
37
  # Install ultralytics
38
  RUN pip install ultralytics
39
 
40
- # Install llama-cpp-python with CUDA support
41
- # Using pre-built wheel from jllllll repository for faster build
42
- RUN pip install llama-cpp-python \
43
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu118
44
 
45
  # Copy requirements and install (excluding llama-cpp-python since we installed it above)
46
  COPY requirements.txt .
 
9
  ENV PORT=7860
10
  ENV DEBIAN_FRONTEND=noninteractive
11
 
 
 
 
 
12
  WORKDIR /app
13
 
14
+ # Install system dependencies
15
  RUN apt-get update && apt-get install -y --no-install-recommends \
16
  ffmpeg \
17
  libsm6 \
 
20
  libglib2.0-0 \
21
  git \
22
  curl \
 
 
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
  # Upgrade pip
 
31
  # Install ultralytics
32
  RUN pip install ultralytics
33
 
34
+ # Install llama-cpp-python with CUDA support from jllllll pre-built wheels
35
+ # This avoids compilation and is much faster
36
+ RUN pip install llama-cpp-python --prefer-binary \
37
+ --extra-index-url=https://jllllll.github.io/llama-cpp-python-cuBLAS-wheels/AVX2/cu118
38
 
39
  # Copy requirements and install (excluding llama-cpp-python since we installed it above)
40
  COPY requirements.txt .