Update Dockerfile
Browse files- Dockerfile +12 -21
Dockerfile
CHANGED
@@ -1,26 +1,17 @@
|
|
1 |
-
# Use an official
|
2 |
-
|
|
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
# Copy the requirements file into the container
|
11 |
-
COPY requirements.txt /app/
|
12 |
-
|
13 |
-
# Install dependencies
|
14 |
-
RUN pip install -r requirements.txt
|
15 |
-
|
16 |
-
# Install ollama
|
17 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
-
|
22 |
-
# Expose the port Streamlit runs on
|
23 |
-
EXPOSE 8501
|
24 |
|
25 |
-
#
|
26 |
-
CMD ["
|
|
|
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 |
+
# Expose the port that your application will run on.
|
13 |
+
# Replace `8080` with the actual port number used by ollama serve.
|
14 |
+
EXPOSE 8080
|
|
|
|
|
15 |
|
16 |
+
# Define the command to run your application.
|
17 |
+
CMD ["ollama", "serve"]
|