docker-llama.cpp / Dockerfile
nouamanetazi's picture
nouamanetazi HF Staff
dockerfile
5347fea
raw
history blame
1.24 kB
# 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.9
# download file
# RUN wget -O ./models/7B/gpt-j-ggml-model-q4_0.bin https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin
# FROM ghcr.io/ggerganov/llama.cpp:light
# WORKDIR /code
# COPY ./requirements.txt /code/requirements.txt
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# COPY . .
# mount ./models/7B
RUN mkdir -p ./models/7B
RUN wget -O ./models/7B/gpt-j-ggml-model-q4_0.bin https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin
# RUN curl -L https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin --output /models/7B/gpt-j-ggml-model-q4_0.bin
# RUN python3 -c "import urllib.request; urllib.request.urlretrieve('https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin', '/models/7B/gpt-j-ggml-model-q4_0.bin')"
CMD ["-m", "./models/7B/gpt-j-ggml-model-q4_0.bin", "-p", "Building a website can be done in 10 simple steps:", "-n", "512"]
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]