matthoffner commited on
Commit
7ff382b
·
1 Parent(s): 998196e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -10
Dockerfile CHANGED
@@ -1,15 +1,28 @@
 
1
  FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Install dependencies
6
  RUN apt update && \
7
- apt install --no-install-recommends -y build-essential python3 python3-pip wget curl git cmake zlib1g-dev libblas-dev && \
8
- apt clean && rm -rf /var/lib/apt/lists/*
9
-
10
- RUN wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
11
-
12
- ENV PATH="/usr/local/cuda/bin:$PATH"
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  WORKDIR /app
15
 
@@ -41,7 +54,5 @@ WORKDIR $HOME/app
41
  # Expose the port
42
  EXPOSE 8080
43
 
44
- RUN ls -al
45
-
46
  # Start the llava-server with models
47
- CMD ["/app/llava-cpp-server/bin/llava-server", "-m", "ggml-model-q4_k.gguf", "--mmproj", "mmproj-model-f16.gguf", "--host", "0.0.0.0"]
 
1
+ # Base image
2
  FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Update and install necessary dependencies
7
  RUN apt update && \
8
+ apt install --no-install-recommends -y \
9
+ build-essential \
10
+ python3 \
11
+ python3-pip \
12
+ wget \
13
+ curl \
14
+ git \
15
+ cmake \
16
+ zlib1g-dev \
17
+ libblas-dev \
18
+ cuda-toolkit-12-2 && \
19
+ apt clean && \
20
+ rm -rf /var/lib/apt/lists/*
21
+
22
+ # Setting up CUDA environment variables (this may not be necessary since you're using the official nvidia/cuda image, but it's good to be explicit)
23
+ ENV PATH="/usr/local/cuda/bin:$PATH" \
24
+ LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH" \
25
+ CUDA_HOME="/usr/local/cuda"
26
 
27
  WORKDIR /app
28
 
 
54
  # Expose the port
55
  EXPOSE 8080
56
 
 
 
57
  # Start the llava-server with models
58
+ CMD ["/app/llava-cpp-server/bin/llava-server", "-m", "ggml-model-q4_k.gguf", "--mmproj", "mmproj-model-f16.gguf", "--host", "0.0.0.0"]