File size: 1,025 Bytes
48a1839
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ca81773
bff5af8
 
 
 
e77ab55
ca81773
 
 
 
 
 
 
 
 
 
9236da3
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
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile

FROM python:3.10

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

WORKDIR /app

COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

COPY --chown=user . /app

USER root
RUN wget -qO- "https://github.com/Kitware/CMake/releases/download/v4.0.1/cmake-4.0.1-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

USER user

RUN git clone https://github.com/ikawrakow/ik_llama.cpp.git
WORKDIR /app/ik_llama.cpp/
RUN cmake -B build -DGGML_NATIVE=1
RUN cmake --build build --config Release
WORKDIR /app/ik_llama.cpp/build/
RUN wget https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-gguf/resolve/9f43072f69492cbd5bc5d5ebb085fec519686a93/ggml-model-i2_s.gguf
RUN ./bin/llama-quantize --allow-requantize ./ggml-model-i2_s.gguf model-out.gguf iq2_bn

WORKDIR /app

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