KapilWaghumbare123 commited on
Commit
79459b1
·
verified ·
1 Parent(s): 0bbfe78

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies and force-install gunicorn and flask up front
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  build-essential \
8
  whois \
@@ -10,10 +10,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
10
 
11
  COPY requirements.txt .
12
 
13
- # Upgrade pip and install packages cleanly
14
  RUN pip install --no-cache-dir --upgrade pip && \
15
- pip install --no-cache-dir gunicorn flask flask-cors && \
16
- pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
17
 
18
  COPY . .
19
 
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  build-essential \
8
  whois \
 
10
 
11
  COPY requirements.txt .
12
 
13
+ # Upgrade pip and install core deployment components
14
  RUN pip install --no-cache-dir --upgrade pip && \
15
+ pip install --no-cache-dir gunicorn flask flask-cors joblib
16
+
17
+ # Install scikit-learn 1.8.0 directly to match your local export environment
18
+ RUN pip install --no-cache-dir scikit-learn==1.8.0
19
+
20
+ # Install the rest of your requirements
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
 
23
  COPY . .
24