Learn / DGX Spark Cluster Setup
Cluster setup, part 1: connect and test
Let's connect two DGX Sparks, and prove the fast link works. We're at the bottom of the stack: the machines, and the cable between them.
Chapters
- 0:00Introduction
- 0:06Where this fits: The AI stack
- 0:11Step one: One cable
- 0:20Before you change anything: Two ways to set it up
- 0:36By hand: Set the addresses
- 0:49Both directions: Add SSH keys
- 0:59Test the link: Prove it's fast
- 1:13Measure it: Run the NCCL test
- 1:26Wrap up
Read the transcript
Introduction
Let's connect two DGX Sparks, and prove the fast link works.
Where this fits: The AI stack
We're at the bottom of the stack: the machines, and the cable between them.
Step one: One cable
Join them with one approved cable, using the same port on each Spark. Hold the pull tab upward, and push gently. Never force it.
Before you change anything: Two ways to set it up
The easy way is Cluster Assistant, in NVIDIA Sync. It sets the addresses and the keys. Or do it by hand, with a network file and SSH keys. Either way, this changes network settings. Keep your normal connection working.
By hand: Set the addresses
By hand, first see which interfaces are up. One port shows up as two. Give each its own address, in a network file. Then try it. This can interrupt the network, and goes back if you don't confirm.
ibdev2netdev
sudo nano /etc/netplan/40-cx7.yaml
sudo netplan tryBoth directions: Add SSH keys
Copy your key to the other Spark. Check its fingerprint before you say yes. Then run a command there, with no password asked. Do the same from the other side.
ssh-copy-id -i ~/.ssh/id_ed25519.pub \
USER@SPARK-TWO-LINK-ADDRESS
ssh USER@SPARK-TWO-LINK-ADDRESS hostnameTest the link: Prove it's fast
Check that both link interfaces are up. Ping the other Spark, on both addresses. Ask which way the traffic goes. It should be the cable, not your home network. Then check the speed the link reports.
Measure it: Run the NCCL test
Last, follow NVIDIA's NCCL playbook. It builds the test on both Sparks. Run it when both are idle, because it loads the GPUs. Keep the result, as your own baseline.
Wrap up
Keep cluster ports private. Part two helps you choose how to use both Sparks.
Sources
- docs.nvidia.com/dgx/dgx-spark/spark-clustering.html
- docs.nvidia.com/sync/latest/cluster-assistant.html
- docs.nvidia.com/sync/latest/cluster-network-inspection.html
- github.com/NVIDIA/dgx-spark-playbooks/tree/main/nvidia/playbook-connect-multiple-sparks
- github.com/NVIDIA/dgx-spark-playbooks/tree/main/nvidia/connect-two-sparks
- github.com/NVIDIA/dgx-spark-playbooks/tree/main/nvidia/playbook-nccl
- docs.vllm.ai/en/latest/usage/security