Datasets:
File size: 579 Bytes
b398413 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Use a lightweight Python base image
FROM python:3.9-slim-buster
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the trained model
# Assuming the model was saved as 'best_random_forest_model.joblib' in the root of the project
COPY best_random_forest_model.joblib .
# Copy the application code
COPY app.py .
# Expose the port your Flask app will run on
EXPOSE 5000
# Command to run the application
CMD ["python", "app.py"]
|