ammariii08 commited on
Commit
4740180
·
verified ·
1 Parent(s): e3b38fb

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +15 -6
dockerfile CHANGED
@@ -1,12 +1,21 @@
1
- # Dockerfile
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
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
10
 
11
- # Expose port and run the app (modify the command if needed)
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"]