File size: 669 Bytes
3246b2f
 
 
 
 
 
 
 
 
 
038dab7
3246b2f
 
 
 
 
 
 
9969397
a796ec9
 
 
9969397
 
3246b2f
9969397
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
# Base image with Python support
FROM python:3.9

# Install dependencies for Ollama installation script (optional)
RUN apt-get update && apt-get install -y curl wget

# Download and potentially execute Ollama installation script (commented out)

# **Alternative: Install Ollama using a package manager (if available)**
RUN pip install ollama
RUN pip install flask

# Set working directory
WORKDIR /


# Copy your FastAPI application code (assuming 'main.py')
COPY main.py .
COPY entrypoint.sh .
# # Start Ollama server in the background
# RUN nohup ollama &

RUN curl -fsSL https://ollama.com/install.sh | sh
RUN chmod +x ./entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]