CryptoScoutv1 commited on
Commit
14cdb59
·
verified ·
1 Parent(s): 7b8956f

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +22 -0
dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04
2
+
3
+ # Install Ollama
4
+ RUN curl -fsSL https://ollama.com/install.sh | sh
5
+
6
+ # Set Ollama to listen on all interfaces
7
+ ENV OLLAMA_HOST=0.0.0.0
8
+
9
+ # Expose Ollama port
10
+ EXPOSE 11434
11
+
12
+ # Create a script to start Ollama and pull models
13
+ RUN echo '#!/bin/bash\n\
14
+ ollama serve &\n\
15
+ sleep 5\n\
16
+ ollama pull $MODEL\n\
17
+ ollama pull $MODEL2\n\
18
+ tail -f /dev/null\n\
19
+ ' > /start.sh && chmod +x /start.sh
20
+
21
+ # Set the entrypoint to our start script
22
+ ENTRYPOINT ["/start.sh"]