Enable hardware nested virtualization components, install the Docker Engine container framework, initiate local MLflow experiment tracking servers, and create target cloud developer profiles.
Environment
Docker / MLflow / Cloud Platform
Difficulty
Intermediate (2/5)
Course Module
MLOps & Deployment
Deliverables
Docker run Logs & MLflow tracking Run
Nested Virtualization requirements: Running Docker container wrappers inside a VirtualBox virtual machine requires enabling Nested Virtualization in your VM settings. If the checkbox (Settings -> System -> Processor -> Enable Nested VT-x/AMD-V) is greyed out on your Windows Host, this guide details how to toggle this parameter using the VBoxManage tool command line in Windows.
1. System Architecture & Process Workflow
The diagram below displays the MLOps pipelines architecture. MLflow logs metrics and parameters locally to a metadata repository. Simultaneously, your Python application is packaged into a Docker container, creating an image loaded by local engine daemons or deployed directly to cloud platforms.
2. Part 1: Step-by-Step Action Items & Key Execution Steps
Toggle system processor register mappings via your local Windows Command Prompt to enable nested hypervisors.
Shutdown Linux VM -> Click Windows Start -> Search "cmd" -> Right-click "Command Prompt" -> Run as Administrator -> Enter command:
C:\> "C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyvm "Your_VM_Name" --nested-hw-virt on
This administrative command enables nested VT-x flags for your specific VM. Replace `"Your_VM_Name"` with the exact folder title of your VM.
STEP 2
Verify CPU settings inside VirtualBox GUI
Review VM CPU options inside the VirtualBox Settings dashboard before starting the VM.
Open VirtualBox Manager -> Select VM -> Click Settings -> Click System -> Click Processor tab -> Verify "Enable Nested VT-x/AMD-V" is checked -> Click OK
This graphical checklist step confirms that the nested hypervisor controller flag is active.
STEP 3
Boot Ubuntu VM and Register Docker GPG Keys
Open the shell terminal, configure certificate parameters, and fetch the security validation keys for Docker.
This opens nano editor. Paste the verification script from Part 2, save, exit, and run it. The MLflow dashboard will register the training run parameters.
3. Operational Pipeline Architecture
The flowchart below outlines the MLOps setup pipeline. It details the steps from enabling nested virtualization and installing Docker CE to launching local tracking servers and logging mock metrics.
4. Part 2: Complete Deliverable Assets & Production Templates
To verify the MLflow tracking service operations, we will build a Python validation script. Below is a line-by-line explanation of the code, followed by the combined script.
Step-by-Step Code Construction
Lines 1 - 3
Import diagnostic modules
Include system, random utility, and MLflow library modules in the code script.
import mlflow
import random
import time
These imports check system paths and load the MLflow client interfaces alongside time delay engines.
Lines 4 - 7
Configure Tracking URI Location
Point the client program to the active local background server instance.