Spaces:
Sleeping
Sleeping
| # Use a lightweight Python image as the base image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the requirements.txt file into the container | |
| COPY requirements.txt . | |
| # Install the dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the application files (app.py and the saved model) into the container | |
| COPY app.py . | |
| COPY best_random_forest_pipeline.joblib . | |
| COPY best_random_forest_model.joblib . | |
| # Run the application when the container starts | |
| CMD ["streamlit", "run", "app.py"] | |
| # If you have other necessary files, copy them here as well | |
| # Expose the port that Streamlit runs on | |
| EXPOSE 8501 | |
| # Command to run the Streamlit application | |
| CMD ["streamlit", "run", "app.py"] | |