subhrajit-mohanty
commited on
Update Dockerfile
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
@@ -13,9 +13,15 @@ RUN mkdir -p $HOME/.ollama && chown -R ollama-user:ollama-user $HOME/.ollama
|
|
13 |
# Switch to the new user
|
14 |
USER ollama-user
|
15 |
|
|
|
16 |
ENV OLLAMA_HOST=0.0.0.0:7860
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
-
#
|
21 |
-
|
|
|
|
|
|
|
|
|
|
13 |
# Switch to the new user
|
14 |
USER ollama-user
|
15 |
|
16 |
+
# Set Ollama to listen on all network interfaces
|
17 |
ENV OLLAMA_HOST=0.0.0.0:7860
|
18 |
|
19 |
+
# Pull the desired model during the build
|
20 |
+
RUN ollama pull steamdj/llama3.1-cpu-only
|
21 |
|
22 |
+
# Expose the default port (7860)
|
23 |
+
EXPOSE 7860
|
24 |
+
|
25 |
+
# Run Ollama serve in the background
|
26 |
+
ENTRYPOINT ["/bin/ollama"]
|
27 |
+
CMD ["serve"]
|