ABCABCABC999 commited on
Commit
920b2e7
·
verified ·
1 Parent(s): 389cfe4

Upload Flask backend files

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -10
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -1,21 +1,20 @@
1
- # Use a lightweight Python image
2
  FROM python:3.10-slim
3
 
4
- # Set working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy requirements first (leverages Docker cache)
8
- COPY requirements.txt .
9
 
10
- # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy all application files into the container
14
- COPY . .
15
 
16
- # Expose port to allow external access
17
  EXPOSE 7860
18
 
19
- # Run the Flask app with waitress (as defined inside app.py)
20
  CMD ["python", "app.py"]
21
-
 
1
+ # Use a lightweight Python base image
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Copy requirements first to leverage Docker caching
8
+ COPY backend_files/requirements.txt .
9
 
10
+ # Install Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the backend app and all necessary files
14
+ COPY backend_files/ .
15
 
16
+ # Expose the app port
17
  EXPOSE 7860
18
 
19
+ # Launch the Flask app using waitress
20
  CMD ["python", "app.py"]
 
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
- streamlit==1.34.0
 
2
  pandas==2.2.2
3
  numpy==2.0.2
4
  joblib==1.4.2
 
1
+ Flask==2.2.2
2
+ waitress==2.1.2
3
  pandas==2.2.2
4
  numpy==2.0.2
5
  joblib==1.4.2