ChandimaPrabath commited on
Commit
05d0e1e
·
verified ·
1 Parent(s): c2deb2a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -13,11 +13,12 @@ ENV HOME=/home/user \
13
  PATH=/home/user/.local/bin:$PATH \
14
  OLLAMA_HOST=0.0.0.0 \
15
  OLLAMA_ORIGINS=* \
16
- # ==> FIX: Point Ollama's model storage to the writable /tmp directory
17
- OLLAMA_MODELS=/tmp/ollama_models
18
 
19
- # This chown is still good practice, so we'll keep it
20
- RUN chown -R user:user $HOME
 
21
 
22
  # Set the working directory and switch to the user
23
  WORKDIR $HOME/app
 
13
  PATH=/home/user/.local/bin:$PATH \
14
  OLLAMA_HOST=0.0.0.0 \
15
  OLLAMA_ORIGINS=* \
16
+ # ==> FIX: Point Ollama's entire data root to a writable directory
17
+ OLLAMA_ROOT=/tmp/ollama
18
 
19
+ # ==> FIX: Create the new root directory and give the user ownership
20
+ RUN mkdir -p $OLLAMA_ROOT && \
21
+ chown -R user:user $OLLAMA_ROOT
22
 
23
  # Set the working directory and switch to the user
24
  WORKDIR $HOME/app