# Use an official base image | |
FROM ubuntu:latest | |
# Install curl, Python, and any other necessary dependencies | |
RUN apt-get update && \ | |
apt-get install -y curl python3 python3-pip && \ | |
rm -rf /var/lib/apt/lists/* | |
# Install ollama | |
RUN curl -fsSL https://ollama.com/install.sh | sh | |
# Copy the Python script into the container | |
COPY your_script.py /usr/local/bin/your_script.py | |
# Make sure the Python script is executable | |
RUN chmod +x /usr/local/bin/your_script.py | |
# Copy a startup script into the container | |
COPY start-ollama.sh /usr/local/bin/start-ollama.sh | |
RUN chmod +x /usr/local/bin/start-ollama.sh | |
# Use the startup script to run commands | |
CMD ["/usr/local/bin/start-ollama.sh"] | |