Update Dockerfile
Browse files- Dockerfile +16 -15
Dockerfile
CHANGED
@@ -4,25 +4,26 @@ FROM python:3.9-slim
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
-
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
-
apt-get install -y curl && \
|
16 |
-
rm -rf /var/lib/apt/lists/*
|
17 |
|
18 |
-
#
|
19 |
-
RUN
|
20 |
|
21 |
-
# Copy the
|
22 |
COPY . .
|
23 |
|
24 |
-
#
|
25 |
-
|
|
|
26 |
|
27 |
-
#
|
28 |
-
CMD ["python", "./main.py"]
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
+
# Install curl and any other dependencies you might need
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
curl \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
+
# Run the install script from the web
|
13 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
|
14 |
|
15 |
+
# Copy the local requirements file to the container
|
16 |
+
COPY requirements.txt ./
|
|
|
|
|
17 |
|
18 |
+
# Install any needed packages specified in requirements.txt
|
19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
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"]
|