CoolFace
Apppublic

weekev/babylon-chat

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
Dockerfile33 linesDownload Raw Back to root
1# syntax=docker/dockerfile:1.0.0-experimental2FROM tiangolo/uvicorn-gunicorn:python3.113 4#ARG MODEL_BIN=ggml-mpt-7b-chat.bin5#ARG MODEL_BIN=orca-mini-3b.ggmlv3.q4_0.bin6ARG MODEL_BIN=ggml-all-MiniLM-L6-v2-f16.bin7ARG MODEL_URL=https://huggingface.co/TheBloke/orca_mini_7B-GGML/resolve/main/orca-mini-7b.ggmlv3.q4_0.bin8 9# Put first so anytime this file changes other cached layers are invalidated.10COPY gpt4all_api/requirements.txt /requirements.txt11 12RUN pip install --upgrade pip13 14# Run various pip install commands with ssh keys from host machine.15RUN --mount=type=ssh pip install -r /requirements.txt && \16  rm -Rf /root/.cache && rm -Rf /tmp/pip-install*17 18# Finally, copy app and client.19COPY gpt4all_api/app /app20 21RUN mkdir -p /models22 23# Include the following line to bake a model into the image and not have to download it on API start.24#COPY models/${MODEL_BIN} /models/${MODEL_BIN}25 26#RUN wget -q --show-progress=off ${MODEL_URL} -P /models \ && md5sum /models/${MODEL_BIN}27 28RUN wget -q --show-progress=on https://gpt4all.io/models/${MODEL_BIN} -P /models \29 && md5sum /models/${MODEL_BIN}30 31CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]32 33