IZERE HIRWA Roger commited on
Commit
63a1cdc
·
1 Parent(s): c36c691
Files changed (1) hide show
  1. Dockerfile +17 -1
Dockerfile CHANGED
@@ -2,11 +2,27 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  # Ensure modern pip/setuptools/wheel before installing heavy requirements
6
  RUN python -m pip install --upgrade pip setuptools wheel
7
 
8
  COPY requirements.txt .
9
- RUN pip install -r requirements.txt
10
 
11
  COPY . .
12
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system build dependencies required to build some wheels (pycld3, llama-cpp-python, etc.)
6
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
7
+ build-essential \
8
+ cmake \
9
+ protobuf-compiler \
10
+ libprotobuf-dev \
11
+ gcc \
12
+ g++ \
13
+ python3-dev \
14
+ libffi-dev \
15
+ libssl-dev \
16
+ pkg-config \
17
+ libgomp1 \
18
+ git \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
  # Ensure modern pip/setuptools/wheel before installing heavy requirements
22
  RUN python -m pip install --upgrade pip setuptools wheel
23
 
24
  COPY requirements.txt .
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
 
27
  COPY . .
28