File size: 719 Bytes
b832e97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1

RUN apt-get update \
    && apt-get install -y --no-install-recommends libgomp1 \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY requirements.txt /app/requirements.txt

# Identical prebuilt CPU-wheel approach to the Composition API.
# NOTE: If the wheel cannot load Qwen3.5 GGUF, upgrade llama-cpp-python.
RUN pip install --upgrade pip \
    && pip install --prefer-binary \
        --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
        -r /app/requirements.txt

COPY main.py /app/main.py

EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]