MVPilgrim commited on
Commit
54a754d
·
1 Parent(s): 99e6ac7

Add cuda support.

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -1
Dockerfile CHANGED
@@ -12,6 +12,15 @@ FROM python:3.11.5
12
 
13
  RUN echo "\n\n############################################# Dockerfile ######################################\n\n"
14
 
 
 
 
 
 
 
 
 
 
15
  #ENTRYPOINT ["/app/startup.sh"]
16
  #RUN apt-get update && \
17
  # apt-get install -y libc6 && \
@@ -42,7 +51,12 @@ RUN pip install https://files.pythonhosted.org/packages/13/87/e0cb08c2d4bd7d38ab
42
  RUN pip show semantic-text-splitter
43
 
44
  #RUN pip install llama_cpp_python
45
- RUN FORCE_CMAKE=1 CMAKE_SYSTEM_PROCESSOR=AMD64 pip install --verbose --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
 
 
 
 
46
 
47
  ##############################################################################
48
  # Install Weaviate
 
12
 
13
  RUN echo "\n\n############################################# Dockerfile ######################################\n\n"
14
 
15
+ ## Install CUDA Toolkit (Includes drivers and SDK needed for building llama-cpp-python with CUDA support)
16
+ RUN apt-get update && apt-get install -y software-properties-common && \
17
+ wget https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda-repo-debian12-12-3-local_12.3.1-545.23.08-1_amd64.deb && \
18
+ dpkg -i cuda-repo-debian12-12-3-local_12.3.1-545.23.08-1_amd64.deb && \
19
+ cp /var/cuda-repo-debian12-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/ && \
20
+ add-apt-repository contrib && \
21
+ apt-get update && \
22
+ apt-get -y install cuda-toolkit-12-3
23
+
24
  #ENTRYPOINT ["/app/startup.sh"]
25
  #RUN apt-get update && \
26
  # apt-get install -y libc6 && \
 
51
  RUN pip show semantic-text-splitter
52
 
53
  #RUN pip install llama_cpp_python
54
+ #RUN FORCE_CMAKE=1 CMAKE_SYSTEM_PROCESSOR=AMD64 pip install --verbose --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
55
+
56
+ ## Install llama-cpp-python with CUDA Support
57
+ RUN CUDACXX=/usr/local/cuda-12/bin/nvcc CMAKE_ARGS="-DGGML_CUDA=on -DCMAKE_CUDA_ARCHITECTURES=all-major" FORCE_CMAKE=1 \
58
+ pip install llama-cpp-python --no-cache-dir --force-reinstall --upgrade
59
+ # pip install jupyterlab llama-cpp-python --no-cache-dir --force-reinstall --upgrade
60
 
61
  ##############################################################################
62
  # Install Weaviate