File size: 750 Bytes
e7d248b
 
482ef78
6574e6d
482ef78
e7d248b
 
 
cc30fea
 
6574e6d
 
 
 
e7d248b
482ef78
2245aaa
b90fff0
482ef78
e7d248b
cc30fea
e7d248b
 
cc30fea
482ef78
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
FROM python:3.10-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential libopenblas-dev && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /code

COPY requirements.txt .

RUN pip install --no-cache-dir \
    "llama-cpp-python==0.3.23" \
    --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu && \
    pip install --no-cache-dir fastapi==0.115.0 "uvicorn[standard]==0.30.6" huggingface_hub==0.25.2

RUN python -c "from huggingface_hub import hf_hub_download; \
    hf_hub_download(repo_id='bartowski/Qwen2.5-7B-Instruct-GGUF', \
    filename='Qwen2.5-7B-Instruct-Q4_K_M.gguf', \
    local_dir='/models')"

COPY app.py .

EXPOSE 7860

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]