File size: 786 Bytes
9d02990
 
 
 
 
 
 
 
 
23badb6
 
c4db438
 
9d02990
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3b5db8
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
28
29
30
31
FROM python:3.11-slim

WORKDIR /app

# 1. Install System Tools & Curl
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    && rm -rf /var/lib/apt/lists/*

    
RUN apt-get update && apt-get install -y zstd


# 2. Install Ollama (The actual software)
RUN curl -fsSL https://ollama.com/install.sh | sh

# 3. Install Python Deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 4. Copy Code
COPY . .

# 5. Start Ollama in background, Pull Model, then Run Streamlit
# We use a wrapper script to ensure Ollama starts before the app
CMD ollama serve & \
    sleep 5 && \
    ollama pull llama3.2:3b && \
    ollama pull hf.co/CompendiumLabs/bge-base-en-v1.5-gguf && \
    streamlit run app.py --server.port 7860 --server.address 0.0.0.0