File size: 691 Bytes
0e876f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# 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"]
|