File size: 1,104 Bytes
8e6bb39
e8f9d0e
7265de1
 
 
e8f9d0e
 
967399f
7265de1
967399f
 
0d63be7
 
967399f
7265de1
 
b53f201
 
967399f
 
a1dded7
c2b1db9
967399f
d867035
7265de1
e8f9d0e
967399f
7265de1
e8f9d0e
 
967399f
 
021e81a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.14

ENV DEBIAN_FRONTEND=noninteractive \
    PYTHONUNBUFFERED=1

WORKDIR /app

# Minimal tools to download the wheel
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements (do NOT include llama-cpp-python here; it's installed separately)
COPY requirements.txt /app/requirements.txt

RUN apt-get update && apt-get install -y libgomp1

# Download the prebuilt wheel and install it, then install other Python deps
RUN mkdir -p /wheels && \
    curl -L -o /wheels/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl \
    "https://github.com/Ishka12345/llama-cpp-python-3.11/releases/download/v1.1.0/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl" && \
    pip install --upgrade pip setuptools wheel && \
    pip install --no-cache-dir /wheels/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl && \
    pip install --no-cache-dir -r /app/requirements.txt

# Copy app sources last to keep previous layers cacheable
COPY app.py /app/app.py

EXPOSE 7860 7861

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