forked from tc-wolf/llama-cpp-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (13 loc) · 725 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (13 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM ubuntu:22.04
# We need to set the host to 0.0.0.0 to allow outside access
ENV HOST 0.0.0.0
# Install the package
RUN apt update && apt install -y ninja-build build-essential pkg-config python3 python3-pip git
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context pyinstaller
COPY . .
RUN PKG_CONFIG_PATH="./OpenBLAS/install/lib/pkgconfig" CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DGGML_USE_LLAMAFILE=1" pip install -e .
RUN mv /OpenBLAS /opt/OpenBLAS
RUN cd /root && pyinstaller -DF /llama_cpp/server/__main__.py \
--add-data /opt/OpenBLAS/:. \
--add-data /llama_cpp/:. \
-n llama-cpp-py-server