subhrajit-mohanty commited on
Commit
a61f414
·
verified ·
1 Parent(s): c41c316

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -10
Dockerfile CHANGED
@@ -1,15 +1,24 @@
1
- # Use the official Ollama image as the base
2
- FROM ollama/ollama:latest
3
 
4
- RUN curl -fsSL https://ollama.com/install.sh | sh
5
- RUN ollama pull steamdj/llama3.1-cpu-only
6
 
7
- # Set environment variables (if needed)
8
- # ENV OLLAMA_API_BASE_URL=http://0.0.0.0:$SPACE_HOST/api
9
- ENV OLLAMA_HOST=0.0.0.0:$SPACE_HOST
 
 
 
10
 
11
- # Expose the port
 
 
 
 
 
 
12
  EXPOSE $SPACE_HOST
13
 
14
- # Run Ollama server and pull the model
15
- CMD ["ollama serve"]
 
1
+ # Start with a lightweight base image
2
+ FROM ubuntu:20.04
3
 
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
 
7
+ # Update the system and install required packages
8
+ RUN apt-get update && apt-get install -y \
9
+ curl \
10
+ sudo \
11
+ unzip \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Download and install Ollama
15
+ RUN curl -fsSL https://ollama.ai/install.sh | bash
16
+
17
+ # Set the working directory
18
+ WORKDIR /app
19
+
20
+ # Expose port 8050 for the Ollama server
21
  EXPOSE $SPACE_HOST
22
 
23
+ # Start the Ollama server on port 8050
24
+ CMD ["ollama", "serve", "--port", $SPACE_HOST]