Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official base image
|
2 |
+
FROM ubuntu:latest
|
3 |
+
|
4 |
+
# Install curl, Python, and any other necessary dependencies
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y curl python3 python3-pip && \
|
7 |
+
rm -rf /var/lib/apt/lists/*
|
8 |
+
|
9 |
+
# Install ollama
|
10 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
11 |
+
|
12 |
+
# Copy the Python script into the container
|
13 |
+
COPY your_script.py /usr/local/bin/your_script.py
|
14 |
+
|
15 |
+
# Make sure the Python script is executable
|
16 |
+
RUN chmod +x /usr/local/bin/your_script.py
|
17 |
+
|
18 |
+
# Copy a startup script into the container
|
19 |
+
COPY start-ollama.sh /usr/local/bin/start-ollama.sh
|
20 |
+
RUN chmod +x /usr/local/bin/start-ollama.sh
|
21 |
+
|
22 |
+
# Use the startup script to run commands
|
23 |
+
CMD ["/usr/local/bin/start-ollama.sh"]
|