Update dockerfile
Browse files- dockerfile +19 -6
dockerfile
CHANGED
|
@@ -1,13 +1,26 @@
|
|
| 1 |
-
# Use a Python
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 . .
|