hari6677 commited on
Commit
da21163
·
verified ·
1 Parent(s): 115518b

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +19 -6
dockerfile CHANGED
@@ -1,13 +1,26 @@
1
- # Use a Python 3.10 image built for deep learning environments
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory inside the container
 
 
 
 
 
 
 
 
5
  WORKDIR /app
6
 
7
- # Copy the requirements file and install dependencies
8
- # The --no-cache-dir ensures a fresh install, reducing deployment errors.
9
- COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
11
 
12
  # Copy all the application files (app.py, model, scaler, etc.)
13
  COPY . .
 
1
+ # Use a Python base image suitable for machine learning
2
  FROM python:3.10-slim
3
 
4
+ # Install system dependencies needed for libraries like TensorFlow
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ libsm6 \
8
+ libxext6 \
9
+ libxrender1 \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set the working directory
13
  WORKDIR /app
14
 
15
+ # Define and install Python dependencies
16
+ # We use an explicit list here instead of a separate requirements.txt for robustness
17
+ RUN pip install --no-cache-dir \
18
+ tensorflow==2.15.0 \
19
+ scikit-learn \
20
+ numpy \
21
+ pandas \
22
+ joblib \
23
+ gradio
24
 
25
  # Copy all the application files (app.py, model, scaler, etc.)
26
  COPY . .