gkc55 commited on
Commit
2e25149
·
1 Parent(s): b029a33

Fix dependencies and add Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -10
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -1,17 +1,12 @@
1
- # Use Python 3.9 as the base image
2
- FROM python:3.9
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy all project files
8
- COPY . /app
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Expose the port Flask runs on
14
  EXPOSE 7860
15
 
16
- # Start Flask app using Gunicorn
17
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
1
+ FROM python:3.9-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
+ COPY requirements.txt .
6
+ RUN pip install -r requirements.txt
7
 
8
+ COPY . .
 
9
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
requirements.txt CHANGED
@@ -1,6 +1,7 @@
1
  flask==2.0.1
 
2
  numpy==1.21.0
3
  pandas==1.3.0
4
  scikit-learn==0.24.2
5
  gunicorn==20.1.0
6
- requests
 
1
  flask==2.0.1
2
+ werkzeug==2.0.3
3
  numpy==1.21.0
4
  pandas==1.3.0
5
  scikit-learn==0.24.2
6
  gunicorn==20.1.0
7
+ requests==2.28.1