File size: 665 Bytes
a9c4cdb
 
c383cfa
a9c4cdb
 
c383cfa
 
 
117d800
a9c4cdb
 
c383cfa
 
 
 
a9c4cdb
 
 
 
 
 
 
 
 
 
 
 
 
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
# Nomos42 phi-3.5-mini-instruct CPU LLM Space — Docker SDK
FROM python:3.11-slim-bookworm

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

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir --prefer-binary -r requirements.txt

COPY app.py .

EXPOSE 7860

RUN useradd -m -u 1000 user
USER user

ENV MODEL_REPO=bartowski/Phi-3.5-mini-instruct-GGUF \
    MODEL_FILE=Phi-3.5-mini-instruct-Q4_K_M.gguf \
    MODEL_DISPLAY=phi-3.5-mini-instruct \
    CHAT_FORMAT=chatml \
    N_CTX=2048 \
    N_THREADS=2 \
    HF_HOME=/tmp/hf-cache

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