subhrajit-mohanty commited on
Commit
e0d433f
·
verified ·
1 Parent(s): c0f0e3a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -0
Dockerfile CHANGED
@@ -1,5 +1,18 @@
1
  FROM ollama/ollama:latest
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ENV OLLAMA_HOST=0.0.0.0:7860
4
 
5
 
 
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
  ENV OLLAMA_HOST=0.0.0.0:7860
17
 
18