holy-script commited on
Commit
e693cc5
·
verified ·
1 Parent(s): 1be1812

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,15 +1,20 @@
1
- # Builder stage
2
  FROM ubuntu:latest
3
 
4
- # Update packages and install dependencies
5
  RUN apt-get update && apt-get install -y \
6
  curl \
7
  gnupg \
8
  python3 \
 
9
  python3-pip
10
 
11
- # Install required Python packages
12
- RUN pip3 install streamlit requests
 
 
 
 
13
 
14
  # Add NVIDIA package repositories
15
  RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
@@ -21,7 +26,7 @@ RUN apt-get update && apt-get install -y nvidia-container-toolkit || true
21
  # Install Ollama
22
  RUN curl https://ollama.ai/install.sh | sh
23
 
24
- # Create the directory and give appropriate permissions
25
  RUN mkdir -p /.ollama && chmod 777 /.ollama
26
 
27
  WORKDIR /.ollama
 
1
+ # Use Ubuntu as the base image
2
  FROM ubuntu:latest
3
 
4
+ # Update package list and install required system dependencies
5
  RUN apt-get update && apt-get install -y \
6
  curl \
7
  gnupg \
8
  python3 \
9
+ python3-venv \
10
  python3-pip
11
 
12
+ # Set up a virtual environment for Python
13
+ RUN python3 -m venv /venv
14
+ ENV PATH="/venv/bin:$PATH"
15
+
16
+ # Install required Python packages inside the virtual environment
17
+ RUN pip install --no-cache-dir streamlit requests
18
 
19
  # Add NVIDIA package repositories
20
  RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
 
26
  # Install Ollama
27
  RUN curl https://ollama.ai/install.sh | sh
28
 
29
+ # Create the directory and set appropriate permissions
30
  RUN mkdir -p /.ollama && chmod 777 /.ollama
31
 
32
  WORKDIR /.ollama