Spaces:
Paused
Paused
| # Use a lightweight Python image | |
| FROM python:3.9-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install MLflow | |
| RUN pip install mlflow | |
| # Expose the default MLflow port | |
| EXPOSE 7860 | |
| # Ensure the /data directory exists | |
| RUN mkdir -p /data/mlruns | |
| # Set environment variables | |
| ENV MLFLOW_TRACKING_URI=file:///data/mlruns | |
| # Command to run the MLflow server | |
| CMD ["mlflow", "server", "--host", "0.0.0.0", "--port", "7860", \ | |
| "--backend-store-uri", "sqlite:////data/mlflow.db", \ | |
| "--default-artifact-root", "/data/mlruns"] | |