llama-cpp-python-djs-bot/huggingface-config/Dockerfile

49 lines
1.3 KiB
Docker
Raw Normal View History

2023-05-05 19:41:03 -04:00
FROM ubuntu:latest
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install curl sudo -y
2023-11-14 18:19:39 -05:00
RUN apt-get install -y ca-certificates curl gnupg
RUN sudo mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ENV NODE_MAJOR=18
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install nodejs -y
2023-05-05 19:41:03 -04:00
RUN DEBIAN_FRONTEND=noninteractive apt install nodejs -y
RUN npm i pm2 -g
RUN mkdir -p /code/.pm2
RUN mkdir -p /.pm2
RUN chmod 0777 /code/.pm2
RUN chmod 0777 /.pm2
2023-05-06 16:19:08 -04:00
RUN DEBIAN_FRONTEND=noninteractive apt install wget python3 python3-pip -y
2023-05-05 19:41:03 -04:00
WORKDIR /code
RUN pip install --no-cache-dir llama-cpp-python[server]
COPY . .
RUN npm i
ENV HOST localhost
ENV PORT 7860
2023-11-14 18:21:35 -05:00
ENV MODEL=/code/mistral-7b-instruct-v0.1.Q2_K.gguf
2023-05-05 19:41:03 -04:00
ENV CACHE=1
2023-05-08 16:15:51 -04:00
ENV USE_MLOCK=0
ENV REPEAT_PENALTY=1
2023-11-14 18:21:35 -05:00
ENV MODEL=/code/mistral-7b-instruct-v0.1.Q2_K.gguf
2023-05-05 19:41:03 -04:00
ENV PM2_HOME=/code/.pm2
2023-05-08 16:15:51 -04:00
2023-11-14 18:21:35 -05:00
RUN wget -q -O mistral-7b-instruct-v0.1.Q2_K.gguf "https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q2_K.gguf?download=true"
2023-05-05 19:41:03 -04:00
CMD /bin/bash /code/start.sh