File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,24 @@ FROM nvidia/cuda:${CUDA_IMAGE}
4
4
# We need to set the host to 0.0.0.0 to allow outside access
5
5
ENV HOST 0.0.0.0
6
6
7
+ RUN apt-get update && apt-get upgrade -y \
8
+ && apt-get install -y git build-essential \
9
+ python3 python3-pip gcc wget \
10
+ ocl-icd-opencl-dev opencl-headers clinfo \
11
+ libclblast-dev libopenblas-dev \
12
+ && mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
13
+
7
14
COPY . .
8
15
9
- # Install the package
10
- RUN apt update && apt install -y python3 python3-pip
16
+ # setting build related env vars
17
+ ENV CUDA_DOCKER_ARCH=all
18
+ ENV LLAMA_CUBLAS=1
19
+
20
+ # Install depencencies
11
21
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings
12
22
13
- RUN LLAMA_CUBLAS=1 pip install llama-cpp-python
23
+ # Install llama-cpp-python (build with cuda)
24
+ RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python
14
25
15
26
# Run the server
16
27
CMD python3 -m llama_cpp.server
You can’t perform that action at this time.
0 commit comments