Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Enable local file store for MLflow tracking backend | |
| ENV MLFLOW_ALLOW_FILE_STORE=true | |
| # Install system dependencies (required for some ML libraries like XGBoost/Pandas) | |
| RUN apt-get update && apt-get install -y \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first to leverage Docker cache | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code | |
| COPY src/ src/ | |
| COPY data/ data/ | |
| COPY .dvc/ .dvc/ | |
| COPY .dvcignore . | |
| COPY .git/ .git/ | |
| COPY mlruns/ mlruns/ | |
| # Make the entrypoint script executable | |
| COPY entrypoint.sh . | |
| RUN chmod +x entrypoint.sh | |
| # Expose the ports for FastAPI and Streamlit (Hugging Face Spaces uses 7860) | |
| EXPOSE 8000 7860 | |
| # Command to run both API and Dashboard using the entrypoint script | |
| CMD ["./entrypoint.sh"] | |