I'll set up my Jetson Nano as a headless device, connecting it to my MacBook via USB-C to Ethernet. The Mac will be on Wi-Fi, sharing its internet with Jetson while I access it over SSH, ensuring Jetson operates without Wi-Fi.
1. Product
- USB 3.1 c-type to RJ45
- M3 Macbook
2. Setup
1. Physical Connection
- Connect the Mac and Jetson using a USB-C to LAN adapter and an Ethernet cable.
2. Mac Configuration
-
System Preferences > Network > Ethernet(LAN):
- Select "Configure Using DHCP" to automatically assign an IP (typically
192.168.2.1
).
- Select "Configure Using DHCP" to automatically assign an IP (typically
-
System Preferences > Sharing:
- Enable "Internet Sharing".
- Share from: Wi-Fi, To computers using: Ethernet(LAN).
3. Jetson Configuration
- Install and enable SSH server:
$ sudo apt update
$ sudo apt install openssh-server
$ sudo systemctl enable ssh
$ sudo systemctl start ssh
- Disable Wi-Fi (use Mac connection only):
$ nmcli radio wifi off
- Set a static IP for the Ethernet interface:
$ sudo nmcli connection modify "Wired connection 1" ipv4.method manual ipv4.addresses "192168.2.2/24" ipv4.gateway "192.168.2.1" ipv4.dns "8.8.8.8"
$ sudo nmcli connection up "Wired connection 1"
4. Verify Connection
- SSH into Jetson from Mac:
$ ssh jetson@192.168.2.2
- Check internet connectivity from Jetson:
$ ping google.com
4. Cuda12
& Pytorch2.*
$ sudo apt install -y python3.12
$ python3 --version
# cuda
$ sudo apt install -y ubuntu-drivers-common
$ sudo ubuntu-drivers autoinstall
$ sudo apt-get install -y cuda-toolkit-12-6
$ echo 'export PATH=/usr/local/cuda-12.6/bin:$PATH' >> ~/.bashrc
$ echo 'export LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
$ source ~/.bashrc
$ nvidia-smi # check
# pytorch 2.x
$ python3.12 -m venv .venv
$ source .venv/bin/activate
$ pip install torch --index-url https://download.pytorch.org/whl/cu126
$ pip install torchvision torchaudio
$ python3 -c "import torch; print('PyTorch version:', torch.__version__); print('Device:', torch.device('cuda' if torch.has_cuda else 'cpu'))"
Top comments (0)