Commit
Β·
c602015
1
Parent(s):
34e8992
update docker config
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
# Start from a base Python image
|
2 |
FROM python:3.12-slim
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
@@ -11,15 +17,12 @@ COPY app.py .
|
|
11 |
COPY src/ ./src/
|
12 |
|
13 |
# Make setup.sh executable and run it
|
14 |
-
# This is where MiniZinc will be installed
|
15 |
RUN chmod +x setup.sh && ./setup.sh
|
16 |
|
17 |
# Install Python dependencies
|
18 |
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
|
20 |
-
#
|
21 |
-
# but that only applies to the RUN layer.
|
22 |
-
# We need to ensure the PATH is set for the runtime environment of the app.
|
23 |
ENV MZN_DIR=/opt/minizinc
|
24 |
ENV PATH="${MZN_DIR}/bin:${PATH}"
|
25 |
# If MiniZinc has shared libraries in MZN_DIR/lib that are needed at runtime:
|
|
|
1 |
# Start from a base Python image
|
2 |
FROM python:3.12-slim
|
3 |
|
4 |
+
# Install wget and other potential necessities like ca-certificates
|
5 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
6 |
+
wget \
|
7 |
+
ca-certificates \
|
8 |
+
&& rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
# Set the working directory in the container
|
11 |
WORKDIR /app
|
12 |
|
|
|
17 |
COPY src/ ./src/
|
18 |
|
19 |
# Make setup.sh executable and run it
|
|
|
20 |
RUN chmod +x setup.sh && ./setup.sh
|
21 |
|
22 |
# Install Python dependencies
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|
25 |
+
# Environment variables for MiniZinc
|
|
|
|
|
26 |
ENV MZN_DIR=/opt/minizinc
|
27 |
ENV PATH="${MZN_DIR}/bin:${PATH}"
|
28 |
# If MiniZinc has shared libraries in MZN_DIR/lib that are needed at runtime:
|