s-ahal commited on
Commit
ae7f27e
·
verified ·
1 Parent(s): f0a275c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -13
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
- FROM python:3.10-slim
 
2
 
3
- # Set working directory
4
- WORKDIR /code
5
 
6
- # Install OS-level dependencies
7
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
8
 
9
- # Install Python dependencies
10
- COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy app files
14
- COPY . .
15
-
16
- # Expose the port
17
  EXPOSE 7860
18
 
19
- # Run the Flask app
20
- CMD ["python", "server.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 /app
6
 
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
 
10
+ # Install any needed packages specified in requirements.txt
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Expose port 7860 (default port for Flask app)
 
 
 
14
  EXPOSE 7860
15
 
16
+ # Run app.py when the container launches
17
+ CMD ["python", "app.py"]