ash-171 commited on
Commit
1cfe90e
·
verified ·
1 Parent(s): 6e3ebe9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -4,12 +4,16 @@ ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PYTHONDONTWRITEBYTECODE=1
5
  ENV PYTHONUNBUFFERED=1
6
 
7
- # Install Python and dependencies
8
  RUN apt-get update && apt-get install -y \
9
  python3 python3-pip ffmpeg curl git wget sudo \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Create a non-root user
 
 
 
 
13
  RUN useradd -ms /bin/bash ollama
14
  USER ollama
15
  WORKDIR /home/ollama
 
4
  ENV PYTHONDONTWRITEBYTECODE=1
5
  ENV PYTHONUNBUFFERED=1
6
 
7
+ # Install system dependencies as root
8
  RUN apt-get update && apt-get install -y \
9
  python3 python3-pip ffmpeg curl git wget sudo \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create Python symlink before switching user
13
+ RUN ln -s /usr/bin/python3 /usr/bin/python
14
+ RUN pip install --upgrade pip
15
+
16
+ # Create non-root user and switch
17
  RUN useradd -ms /bin/bash ollama
18
  USER ollama
19
  WORKDIR /home/ollama