Soumik Bose commited on
Commit
418f64b
·
1 Parent(s): c7980ff
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -8,8 +8,10 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
8
 
9
  WORKDIR /app
10
 
11
- # Minimal dependencies
12
  RUN apt-get update && apt-get install -y \
 
 
13
  curl \
14
  && rm -rf /var/lib/apt/lists/*
15
 
@@ -17,12 +19,15 @@ RUN apt-get update && apt-get install -y \
17
  RUN useradd -m -u 1000 user
18
  RUN mkdir -p /app/cache /app/models && chown -R user:user /app
19
 
 
 
 
20
  USER user
21
 
22
- # Install everything
23
- RUN pip install --no-cache-dir --upgrade pip
24
  COPY --chown=user:user requirements.txt .
25
- RUN pip install --no-cache-dir -r requirements.txt
 
26
 
27
  # Copy app
28
  COPY --chown=user:user main.py .
 
8
 
9
  WORKDIR /app
10
 
11
+ # Install build dependencies for llama-cpp-python
12
  RUN apt-get update && apt-get install -y \
13
+ build-essential \
14
+ cmake \
15
  curl \
16
  && rm -rf /var/lib/apt/lists/*
17
 
 
19
  RUN useradd -m -u 1000 user
20
  RUN mkdir -p /app/cache /app/models && chown -R user:user /app
21
 
22
+ # Install pip as root first
23
+ RUN pip install --no-cache-dir --upgrade pip
24
+
25
  USER user
26
 
27
+ # Install dependencies
 
28
  COPY --chown=user:user requirements.txt .
29
+ RUN CMAKE_ARGS="-DGGML_BLAS=OFF -DGGML_NATIVE=OFF" \
30
+ pip install --no-cache-dir -r requirements.txt
31
 
32
  # Copy app
33
  COPY --chown=user:user main.py .