File size: 481 Bytes
4b1732a
 
 
1e253c0
4b1732a
 
 
 
5211197
 
7080a88
1e253c0
5211197
7080a88
 
4b1732a
 
5211197
4b1732a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM ubuntu:22.04

# Install dependencies
RUN apt update && apt install -y curl git python3 python3-pip

# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh

# Start Ollama server in the background and pull the model
RUN ollama serve & sleep 5 && ollama pull llama3.2:3b-instruct-fp16

# Install Python dependencies
RUN pip install langchain langchain_ollama ollama

# Expose Ollama API port
EXPOSE 11434

# Start Ollama on container startup
CMD ["ollama", "serve"]