Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
|
@@ -1,17 +1,18 @@
|
|
| 1 |
-
# Use an official base image that includes the necessary dependencies, such as curl.
|
| 2 |
-
# Debian or Ubuntu are common choices for many applications.
|
| 3 |
FROM debian:latest
|
| 4 |
|
| 5 |
-
# Install curl. The base image might already include it, but this ensures it's available.
|
| 6 |
RUN apt-get update && apt-get install -y curl
|
| 7 |
-
|
| 8 |
-
# Download and execute the install script for your application.
|
| 9 |
-
# Using `sh -c` to ensure shell interpretations like pipe works correctly.
|
| 10 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
EXPOSE 8080
|
| 15 |
|
| 16 |
-
|
| 17 |
-
CMD ["ollama", "serve"]
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM debian:latest
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y curl
|
|
|
|
|
|
|
|
|
|
| 4 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 5 |
|
| 6 |
+
# Assuming ollama uses /ollama for storage, create the directory and ensure correct permissions
|
| 7 |
+
RUN mkdir -p /ollama && \
|
| 8 |
+
chmod -R 777 /ollama
|
| 9 |
+
|
| 10 |
+
# Alternatively, you could create a specific user to run ollama and adjust file ownership
|
| 11 |
+
# RUN useradd -m ollamauser
|
| 12 |
+
# RUN mkdir -p /ollama
|
| 13 |
+
# RUN chown -R ollamauser:ollamauser /ollama
|
| 14 |
+
# USER ollamauser
|
| 15 |
+
|
| 16 |
EXPOSE 8080
|
| 17 |
|
| 18 |
+
CMD ["ollama", "serve"]
|
|
|