File size: 650 Bytes
e5687b3
d11f996
e5687b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d11f996
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install Ollama
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://ollama.com/install.sh | sh

# Pre-download the llama3 model
RUN ollama pull llama3

# Copy the app code
COPY app.py .

# Expose the Streamlit port
EXPOSE 8501

# Start Ollama in the background, wait 5 seconds, then run Streamlit
CMD ollama serve & sleep 5 && streamlit run app.py --server.port 8501 --server.address 0.0.0.0