Skip to content

Installation

Install mlenvdoctor in the same Python environment where your ML stack runs. Most users should start with pip.

pip

py -m pip install --upgrade pip
py -m pip install mlenvdoctor
mlenvdoctor --version
python -m pip install --upgrade pip
python -m pip install mlenvdoctor
mlenvdoctor --version
conda create -n ml-debug python=3.11 -y
conda activate ml-debug
python -m pip install mlenvdoctor
mlenvdoctor doctor --guided

Install into the active environment

If your model runs inside .venv, Conda, Pipenv, WSL, or a container, install and run mlenvdoctor there. Running it from a different shell diagnoses the wrong machine state.

Docker Workflow

Use dockerize when you want a reproducible starting point for model testing or fine-tuning.

mlenvdoctor dockerize tinyllama --stack minimal
docker build -f Dockerfile.mlenvdoctor -t tinyllama-env .

For GPU containers, verify the host first:

docker run --rm --gpus all nvidia/cuda:12.4.0-base-ubuntu22.04 nvidia-smi
mlenvdoctor diagnose --full

Development Setup

git clone https://github.com/Dheena731/Ml-env-doctor.git
cd Ml-env-doctor
python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
pre-commit install
pytest
.\.venv\Scripts\Activate.ps1
source .venv/bin/activate

Documentation Setup

python -m pip install -r requirements-docs.txt
mkdocs serve

The local preview opens at http://127.0.0.1:8000/.