Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -5
Dockerfile
CHANGED
@@ -1,16 +1,27 @@
|
|
1 |
-
# Use the
|
2 |
-
FROM
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy
|
8 |
-
COPY main.py .
|
9 |
COPY requirements.txt .
|
10 |
|
11 |
-
# Install
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# Expose the necessary port
|
15 |
EXPOSE 7860
|
16 |
|
|
|
1 |
+
# Stage 1: Use the official Python image to install dependencies
|
2 |
+
FROM python:3.10-slim as builder
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the requirements file
|
|
|
8 |
COPY requirements.txt .
|
9 |
|
10 |
+
# Install Python dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Stage 2: Use the Inno Setup Docker image
|
14 |
+
FROM amake/innosetup:latest
|
15 |
+
|
16 |
+
# Set the working directory
|
17 |
+
WORKDIR /app
|
18 |
+
|
19 |
+
# Copy the Flask app files from the builder stage
|
20 |
+
COPY --from=builder /app /app
|
21 |
+
|
22 |
+
# Copy the main.py file
|
23 |
+
COPY main.py .
|
24 |
+
|
25 |
# Expose the necessary port
|
26 |
EXPOSE 7860
|
27 |
|