File size: 683 Bytes
730525f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16cd7b9
730525f
 
16cd7b9
730525f
 
 
 
16cd7b9
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
FROM python:latest

RUN apt update && \
	apt install -y wget

# https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH \
	HOST=0.0.0.0

WORKDIR $HOME/app

COPY --chown=user app.py .

RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python[server] huggingface_hub[cli,hf_transfer]

RUN HF_HUB_ENABLE_HF_TRANSFER=1 \
	huggingface-cli download gingdev/llama7b-ictu-v2 llama7b_q4_k_m.gguf --local-dir . --local-dir-use-symlinks=True

EXPOSE 8000

ENTRYPOINT [ "python" ]
CMD [ "app.py", "--model", "llama7b_q4_k_m.gguf", "--chat_format", "chatml" ]