experiment / Dockerfile
gingdev's picture
update
16cd7b9
raw
history blame contribute delete
No virus
683 Bytes
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" ]