Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -19
Dockerfile
CHANGED
|
@@ -1,26 +1,20 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
USER root
|
| 5 |
-
RUN mkdir -p /.ollama && \
|
| 6 |
-
chmod -R 777 /.ollama
|
| 7 |
|
| 8 |
-
|
| 9 |
-
COPY ollama-pull.sh /ollama-pull.sh
|
| 10 |
-
RUN chmod +x /ollama-pull.sh
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
-
EXPOSE 11434
|
| 25 |
-
ENV OLLAMA_HOST 0.0.0.0
|
| 26 |
-
CMD ["serve"]
|
|
|
|
| 1 |
+
# Builder stage
|
| 2 |
+
FROM ubuntu:latest
|
| 3 |
|
| 4 |
+
RUN apt update && apt install curl -y
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
RUN curl https://ollama.ai/install.sh | sh
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
# Create the directory and give appropriate permissions
|
| 9 |
+
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
| 10 |
|
| 11 |
+
WORKDIR /.ollama
|
| 12 |
|
| 13 |
+
# Command to run the application
|
| 14 |
+
CMD ollama serve
|
| 15 |
|
| 16 |
+
# Command to pull model
|
| 17 |
+
CMD ollama pull llama2
|
| 18 |
|
| 19 |
+
# Expose the server port
|
| 20 |
+
EXPOSE 7860
|
|
|
|
|
|
|
|
|