TheBlueberry-AI commited on
Commit
8db7ec5
·
1 Parent(s): a9da45d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y libopenblas-dev ninja-build build-essential pkg-config curl
5
+
6
+ RUN pip install -U pip setuptools wheel && \
7
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" FORCE_CMAKE=1 pip install --verbose llama-cpp-python[server]
8
+
9
+ RUN mkdir model && \
10
+ curl -L https://huggingface.co/TheBloke/openchat_3.5-GGUF/resolve/main/openchat_3.5.Q4_K_M.gguf -o models/gguf-model.bin
11
+
12
+ COPY ./startserver.sh ./
13
+ COPY ./main.py ./
14
+ COPY ./index.html ./
15
+
16
+ RUN chmod +x ./startserver.sh
17
+
18
+ ENV HOST=0.0.0.0
19
+ ENV PORT=7860
20
+ EXPOSE ${PORT}
21
+
22
+ # start server
23
+ CMD ["/bin/sh", "./startserver.sh"]