Update Dockerfile
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
-
# Use
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
-
# Install
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
|
16 |
-
#
|
|
|
|
|
|
|
17 |
RUN chmod +x main.py
|
18 |
|
19 |
-
# Run
|
20 |
-
CMD ["python", "./main.py"]
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
+
# Install curl
|
8 |
+
RUN apt-get update && \
|
9 |
+
apt-get install -y curl && \
|
10 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
11 |
|
12 |
+
# Download and execute the installation script
|
13 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
14 |
|
15 |
+
# Copy the local directory contents into the container at /usr/src/app
|
16 |
+
COPY . .
|
17 |
+
|
18 |
+
# Make sure main.py is executable
|
19 |
RUN chmod +x main.py
|
20 |
|
21 |
+
# Run main.py when the container launches
|
22 |
+
CMD ["python", "./main.py"]
|