The xFusionCorp Industries ML team is adopting MLflow for experiment tracking. Your task is to bring up a local MLflow tracking server on the ML pipeline workstation so experiments can be logged from the team’s training code.
MLflow 3.x is pre-installed on the controlplane. Launch the tracking server in the background so that every end-state requirement below holds.
The server is listening on port 5000 and is reachable on all interfaces.
The backend store is a SQLite database at /root/code/mlflow-backend/mlflow.db. The database file must exist after the server has started.
The artifact root is /root/code/mlflow-artifacts/.
Any parent directories the server needs must be in place before it starts—MLflow will abort if the backend directory is missing.
The MLflow UI button at the top of the lab must open a responsive dashboard in the browser. The button routes through the lab proxy, so the server must accept requests from any origin (--cors-allowed-origins '*') and any host header (--allowed-hosts '*') to avoid proxy-related rejections.
The server process must persist in the background so it survives terminal closure.
Once the server is running, the
Defaultexperiment can be viewed from the MLflow UI button. The experiment is empty—runs will be logged in subsequent labs.
Create the following directories:
mkdir -p /root/code/{mlflow-backend,mlflow-artifacts}
Run the following command to start mlflow server according to task description:
uvx mlflow server \
--backend-store-uri sqlite:////root/code/mlflow-backend/mlflow.db \
--default-artifact-root /root/code/mlflow-artifacts/ \
--host 0.0.0.0 \
--port 5000 \
--cors-allowed-origins '*' \
--allowed-hosts '*' > /tmp/mlflow.log 2>&1 &
Click on UI to make sure it’s running.
Using uvx: The uvx command runs the mlflow package without requiring a global installation. It’s a convenient way to invoke tools from Python packages directly.
Backend Store URI: The sqlite:////root/code/mlflow-backend/mlflow.db format uses four slashes (three for sqlite:// + one for the absolute path starting with /). This is required for absolute paths on Unix-like systems.
--cors-allowed-origins '*' allows cross-origin requests, which is critical when the MLflow UI is accessed through a lab proxy.--allowed-hosts '*' accepts any Host header, preventing proxy-related rejections.Verifying the Server:
# Check if the process is running
ps aux | grep mlflow
# Check the log file
cat /tmp/mlflow.log
# Test connectivity
curl http://localhost:5000/
Background Process: The & at the end runs the process in the background. The > /tmp/mlflow.log 2>&1 redirects both stdout and stderr to a log file for troubleshooting.
Port Access: Ensure port 5000 is not already in use before starting the server. If needed, use a different port with --port <PORT_NUMBER>.
Database Initialization: MLflow will create the database file automatically, but parent directories must exist. The solution creates the /root/code/mlflow-backend/ directory beforehand to avoid startup failures.
/root/code/mlflow-artifacts/. Ensure sufficient disk space is available.