Update Dockerfile
Browse files- Dockerfile +10 -24
Dockerfile
CHANGED
@@ -1,29 +1,15 @@
|
|
1 |
-
#
|
2 |
-
FROM
|
3 |
|
4 |
-
|
5 |
-
WORKDIR /usr/src/app
|
6 |
|
7 |
-
|
8 |
-
RUN apt-get update && apt-get install -y \
|
9 |
-
curl \
|
10 |
-
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
-
#
|
13 |
-
RUN
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
-
|
21 |
-
# Copy the rest of the application's source code from your host to your image filesystem.
|
22 |
-
COPY . .
|
23 |
-
|
24 |
-
# Run ollama serve (adjust if the command is different or requires additional flags)
|
25 |
-
# Note: If "ollama serve" is meant to run continuously, consider using it under CMD or ENTRYPOINT as appropriate.
|
26 |
-
RUN ollama serve
|
27 |
-
|
28 |
-
# Command to run the Python script
|
29 |
-
CMD ["python", "./main.py"]
|
|
|
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 |
+
# Command to run the application
|
12 |
+
CMD ollama serve
|
13 |
|
14 |
+
# Expose the server port
|
15 |
+
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|