subhrajit-mohanty commited on
Commit
b4e4d28
·
verified ·
1 Parent(s): b691038

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -1,5 +1,19 @@
1
  FROM ollama/ollama:latest
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ENV OLLAMA_HOST=0.0.0.0
4
 
5
  ENTRYPOINT ollama serve
 
1
  FROM ollama/ollama:latest
2
 
3
+ # Create a user and set up permissions
4
+ RUN useradd -ms /bin/bash ollama-user
5
+
6
+ # Set the home directory
7
+ ENV HOME=/home/ollama-user
8
+ WORKDIR $HOME
9
+
10
+ # Ensure the user has access to the directory
11
+ RUN mkdir -p $HOME/.ollama && chown -R ollama-user:ollama-user $HOME/.ollama
12
+
13
+ # Switch to the new user
14
+ USER ollama-user
15
+
16
+
17
  ENV OLLAMA_HOST=0.0.0.0
18
 
19
  ENTRYPOINT ollama serve