File size: 574 Bytes
db21709
 
 
 
18738f2
db21709
 
 
 
18738f2
db21709
18738f2
 
 
db21709
18738f2
 
db21709
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.13-slim

WORKDIR /app

# Install compilation prerequisites
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    git \
    && rm -rf /var/lib/apt/lists/*

# Upgrade pip and install the latest llama-cpp-python directly from source with no cache
RUN pip install --no-cache-dir --upgrade pip && \
    CMAKE_ARGS="-DLLAMA_GGML_BACKEND_DL=OFF" pip install --no-cache-dir --no-binary :all: llama-cpp-python

# Install other requirements 
RUN pip install --no-cache-dir flask huggingface_hub

COPY . .

EXPOSE 7860
CMD ["python", "app.py"]