ChandimaPrabath commited on
Commit
929b107
·
verified ·
1 Parent(s): 7ee6776

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -20
Dockerfile CHANGED
@@ -1,33 +1,19 @@
1
- # Use the latest version of the ollama image
2
  FROM ollama/ollama:latest
3
 
4
- # Install curl and create a user
5
- RUN apt-get update && \
6
- apt-get install -y curl && \
7
- apt-get clean && \
8
- rm -rf /var/lib/apt/lists/* && \
9
- useradd -m -u 1000 user
10
 
11
- # Set environment variables
 
 
12
  ENV HOME=/home/user \
13
- PATH=/home/user/.local/bin:$PATH \
14
  OLLAMA_HOST=0.0.0.0 \
15
  OLLAMA_ORIGINS=*
16
 
17
- # Set the working directory and switch to the user
18
  WORKDIR $HOME/app
19
- USER user
20
 
21
- # Copy the Modelfile to the working directory
22
  COPY --chown=user:user Modelfile $HOME/app/
23
 
24
- # Pull the necessary models and start the Ollama server
25
- RUN ollama serve & \
26
- sleep 5 && \
27
- ollama pull llama3.2 && \
28
- ollama pull llama3.2:1b && \
29
- ollama pull granite3-moe && \
30
- ollama pull granite3-moe:1b
31
 
32
- # Expose the port for the Ollama server
33
  EXPOSE 11434
 
 
1
  FROM ollama/ollama:latest
2
 
3
+ RUN apt-get update && apt-get install curl -y
 
 
 
 
 
4
 
5
+ # https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
  ENV HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH \
10
  OLLAMA_HOST=0.0.0.0 \
11
  OLLAMA_ORIGINS=*
12
 
 
13
  WORKDIR $HOME/app
 
14
 
 
15
  COPY --chown=user:user Modelfile $HOME/app/
16
 
17
+ RUN ollama serve & sleep 5 && ollama pull qwen2:0.5b
 
 
 
 
 
 
18
 
 
19
  EXPOSE 11434