File size: 710 Bytes
da21163 115518b da21163 115518b da21163 115518b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# Use a Python base image suitable for machine learning
FROM python:3.10-slim
# Install system dependencies needed for libraries like TensorFlow
RUN apt-get update && apt-get install -y \
build-essential \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Define and install Python dependencies
# We use an explicit list here instead of a separate requirements.txt for robustness
RUN pip install --no-cache-dir \
tensorflow==2.15.0 \
scikit-learn \
numpy \
pandas \
joblib \
gradio
# Copy all the application files (app.py, model, scaler, etc.)
COPY . .
# Command to run the Gradio app
CMD python app.py |