thewise commited on
Commit
52d4d06
1 Parent(s): 360362a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -6
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  # Builder stage
2
  FROM ubuntu:latest
3
 
4
- RUN apt update && apt install curl -y
5
 
6
  RUN curl https://ollama.ai/install.sh | sh
7
 
@@ -10,11 +10,16 @@ RUN mkdir -p /.ollama && chmod 777 /.ollama
10
 
11
  WORKDIR /.ollama
12
 
13
- # Command to run the application
14
- CMD ollama serve
 
15
 
16
- # Command to pull model
17
- CMD ollama pull llama2
 
 
 
 
18
 
19
  # Expose the server port
20
- EXPOSE 7860
 
1
  # Builder stage
2
  FROM ubuntu:latest
3
 
4
+ RUN apt update && apt install curl -y
5
 
6
  RUN curl https://ollama.ai/install.sh | sh
7
 
 
10
 
11
  WORKDIR /.ollama
12
 
13
+ # Copy the entry point script
14
+ COPY entrypoint.sh /entrypoint.sh
15
+ RUN chmod +x /entrypoint.sh
16
 
17
+ # Set the entry point script as the default command
18
+ ENTRYPOINT ["/entrypoint.sh"]
19
+ CMD ["ollama", "serve"]
20
+
21
+ # Set the model as an environment variable (this can be overridden)
22
+ ENV model=llama2
23
 
24
  # Expose the server port
25
+ EXPOSE 7860