File size: 528 Bytes
a8ac603
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 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"]