matthoffner commited on
Commit
2ae36bd
·
verified ·
1 Parent(s): 274af50

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -1,11 +1,3 @@
1
- ARG UBUNTU_VERSION=22.04
2
- # This needs to generally match the container host's environment.
3
- ARG CUDA_VERSION=11.7.1
4
- # Target the CUDA build image
5
- ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
6
- # Target the CUDA runtime image
7
- ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
8
-
9
  FROM ${BASE_CUDA_DEV_CONTAINER} as build
10
 
11
  # Unless otherwise specified, we make a fat build.
@@ -14,6 +6,9 @@ ARG CUDA_DOCKER_ARCH=all
14
  RUN apt-get update && \
15
  apt-get install -y build-essential git
16
 
 
 
 
17
  WORKDIR /app
18
 
19
  COPY . .
@@ -34,8 +29,11 @@ RUN apt-get update && \
34
  pkg-config \
35
  curl
36
 
37
- RUN pip install -U pip setuptools wheel && \
38
- pip install --verbose llama-cpp-python[server]
 
 
 
39
 
40
  # Download model
41
  RUN mkdir model && \
@@ -56,4 +54,4 @@ ENV PORT=7860
56
  EXPOSE ${PORT}
57
 
58
  # Run the server start script
59
- CMD ["/bin/sh", "./start_server.sh"]
 
 
 
 
 
 
 
 
 
1
  FROM ${BASE_CUDA_DEV_CONTAINER} as build
2
 
3
  # Unless otherwise specified, we make a fat build.
 
6
  RUN apt-get update && \
7
  apt-get install -y build-essential git
8
 
9
+ # Install Python3 and pip
10
+ RUN apt-get install -y python3 python3-pip
11
+
12
  WORKDIR /app
13
 
14
  COPY . .
 
29
  pkg-config \
30
  curl
31
 
32
+ # Install Python3 and pip for the runtime container as well
33
+ RUN apt-get install -y python3 python3-pip
34
+
35
+ RUN pip3 install -U pip setuptools wheel && \
36
+ pip3 install --verbose llama-cpp-python[server]
37
 
38
  # Download model
39
  RUN mkdir model && \
 
54
  EXPOSE ${PORT}
55
 
56
  # Run the server start script
57
+ CMD ["/bin/sh", "./start_server.sh"]