Yaya86 commited on
Commit
125b878
1 Parent(s): b2e7ecf

Update Dockerfile

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