Yaya86 commited on
Commit
7f8472a
·
verified ·
1 Parent(s): b52c331

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -8
Dockerfile CHANGED
@@ -7,31 +7,33 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
7
 
8
  ENV OLLAMA_HOST=0.0.0.0
9
 
10
- RUN useradd -m appuser && chown -R appuser:appuser /home/appuser
 
11
 
12
 
13
  # Create the directory and give appropriate permissions
14
- RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
 
15
  #RUN mkdir -p /home/appuser/.ollama/models &&
16
 
17
  USER appuser
18
 
19
- WORKDIR /home/appuser/.ollama
20
 
21
  #Copy dossier de models
22
 
23
- #COPY --chown=appuser models /.ollama
24
  #RUN chmod 777 /home/appuser/.ollama/models
25
  # Copy the entry point script
26
- COPY --chown=appuser entrypoint.sh /entrypoint.sh
27
- RUN chmod +x /entrypoint.sh
28
 
29
  # Set the entry point script as the default command
30
- ENTRYPOINT ["/entrypoint.sh"]
31
  #CMD ollama serve
32
 
33
  # Set the model as an environment variable (this can be overridden)
34
- ENV model="nomic-embed-text","yayarun/mixtral_erbot"
35
  #ENV OLLAMA_MODELS="/home/appuser/.ollama/models"
36
 
37
  # Expose the server port
 
7
 
8
  ENV OLLAMA_HOST=0.0.0.0
9
 
10
+ RUN useradd -m -u 1000 appuser
11
+ #&& chown -R appuser:appuser /home/appuser
12
 
13
 
14
  # Create the directory and give appropriate permissions
15
+ RUN mkdir -p /.ollama && chmod 777 /.ollama
16
+ #RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
17
  #RUN mkdir -p /home/appuser/.ollama/models &&
18
 
19
  USER appuser
20
 
21
+ WORKDIR /.ollama
22
 
23
  #Copy dossier de models
24
 
25
+ COPY --chown=appuser models /.ollama/models
26
  #RUN chmod 777 /home/appuser/.ollama/models
27
  # Copy the entry point script
28
+ #COPY --chown=appuser entrypoint.sh /entrypoint.sh
29
+ #RUN chmod +x /entrypoint.sh
30
 
31
  # Set the entry point script as the default command
32
+ #ENTRYPOINT ["/entrypoint.sh"]
33
  #CMD ollama serve
34
 
35
  # Set the model as an environment variable (this can be overridden)
36
+ #ENV model="nomic-embed-text","yayarun/mixtral_erbot"
37
  #ENV OLLAMA_MODELS="/home/appuser/.ollama/models"
38
 
39
  # Expose the server port