If you need additional features like , SentencePiece , or the Transformer Engine , use the following command for a complete setup:
docker run --ipc=host --shm-size=512m --gpus all -it nvcr.io/nvidia/pytorch:24.02-py3 Use code with caution. Copied to clipboard Download Install Megatron Repo zip
Once inside the container, you can proceed with the source installation as described above. If you need additional features like , SentencePiece
: An NVIDIA GPU (Turing architecture or later recommended). For advanced FP8 support, NVIDIA Hopper, Ada, or Blackwell GPUs are required. Python : Version 3.10 or higher (3.12 is recommended). PyTorch : Version 2.6.0 or higher. CUDA Toolkit : The latest stable version. If you need additional features like
uv pip install --group build uv pip install --no-build-isolation -e ".[training,dev]" Use code with caution. Copied to clipboard