File size: 706 Bytes
644a65a
9d29c62
644a65a
9d29c62
644a65a
 
 
 
9d29c62
644a65a
9d29c62
644a65a
f26f5ad
9d29c62
644a65a
 
9d29c62
644a65a
9d29c62
b491696
644a65a
b491696
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.10-slim

RUN apt-get update && apt-get install -y wget build-essential && rm -rf /var/lib/apt/lists/*

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

# Download DictaLM 2.0 Q4_K_M GGUF
RUN wget -q -O model.gguf "https://huggingface.co/dicta-il/dictalm2.0-instruct-GGUF/resolve/main/dictalm2.0-instruct.Q4_K_M.gguf"

COPY --chown=user . .

# Run FastAPI server
# Port 7860 is required for HF Spaces
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]