Spaces:
Running
Running
Update dockerfile
Browse files- dockerfile +15 -6
dockerfile
CHANGED
@@ -1,12 +1,21 @@
|
|
1 |
-
#
|
2 |
FROM python:3.11
|
3 |
|
|
|
4 |
WORKDIR /app
|
|
|
|
|
5 |
COPY . /app
|
6 |
|
7 |
-
# Upgrade pip and install dependencies
|
8 |
-
RUN pip install --upgrade pip
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
#
|
12 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use Python 3.11 as the base image
|
2 |
FROM python:3.11
|
3 |
|
4 |
+
# Set the working directory inside the container
|
5 |
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy all files into the container
|
8 |
COPY . /app
|
9 |
|
10 |
+
# Upgrade pip and install dependencies from requirements.txt
|
11 |
+
RUN pip install --upgrade pip && \
|
12 |
+
pip install --no-cache-dir -r requirements.txt
|
13 |
+
|
14 |
+
# Optional: Print the Python version to confirm the correct version is used
|
15 |
+
RUN python --version
|
16 |
+
|
17 |
+
# Expose the default Gradio port (adjust if needed)
|
18 |
+
EXPOSE 7860
|
19 |
|
20 |
+
# Set the command to run your Gradio app
|
21 |
+
CMD ["python", "app.py"]
|