Tim Luka Horstmann commited on
Commit
cf856fa
·
1 Parent(s): 2be7af9

Updated llama build

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -6
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -1,17 +1,20 @@
1
  # Use an official Python runtime as a base image
2
- FROM python:3.10-slim
3
 
4
  # Set environment variables
5
  ENV TRANSFORMERS_CACHE=/app/cache \
6
  HF_HOME=/app/cache \
7
- DEBIAN_FRONTEND=noninteractive
 
8
 
9
  # Set working directory
10
  WORKDIR /app
11
 
12
- # Install minimal system dependencies for running the app
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  libgomp1 \
 
 
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Prepare cache directory
@@ -20,9 +23,9 @@ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
20
  # Copy requirements and install Python packages
21
  COPY requirements.txt .
22
 
23
- # Install most packages from requirements.txt, then llama-cpp-python with binary-only
24
- RUN grep -v "llama-cpp-python" requirements.txt | pip install --no-cache-dir -r /dev/stdin \
25
- && pip install --no-cache-dir --only-binary=all llama-cpp-python==0.3.14
26
 
27
  # Copy application code and data
28
  COPY app.py cv_embeddings.json cv_text.txt ./
 
1
  # Use an official Python runtime as a base image
2
+ FROM python:3.10
3
 
4
  # Set environment variables
5
  ENV TRANSFORMERS_CACHE=/app/cache \
6
  HF_HOME=/app/cache \
7
+ DEBIAN_FRONTEND=noninteractive \
8
+ CMAKE_ARGS="-DGGML_CUDA=OFF"
9
 
10
  # Set working directory
11
  WORKDIR /app
12
 
13
+ # Install system dependencies
14
  RUN apt-get update && apt-get install -y --no-install-recommends \
15
  libgomp1 \
16
+ build-essential \
17
+ cmake \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
  # Prepare cache directory
 
23
  # Copy requirements and install Python packages
24
  COPY requirements.txt .
25
 
26
+ # Upgrade pip and install packages
27
+ RUN pip install --upgrade pip && \
28
+ pip install --no-cache-dir -r requirements.txt
29
 
30
  # Copy application code and data
31
  COPY app.py cv_embeddings.json cv_text.txt ./
requirements.txt CHANGED
@@ -9,4 +9,5 @@ psutil
9
  google-genai
10
  asyncio
11
  elevenlabs
12
- httpx
 
 
9
  google-genai
10
  asyncio
11
  elevenlabs
12
+ httpx
13
+ llama-cpp-python==0.2.85