Enable CUDA Peer-to-Peer (P2P) communication between 4x RTX 5060 Ti GPUs on an old Xeon E5 v4 / X99 platform where NVIDIA reports P2P as unsupported.
Target workload:
- SGLang TP=4
- vLLM TP=4
| #!/usr/bin/env python3 | |
| """ | |
| ventoy-macos-install.py - Install Ventoy on a USB drive from macOS. | |
| This script installs Ventoy on a USB drive without requiring macFUSE, | |
| Linux, or a VM. It writes the GPT partition table, boot code, and | |
| EFI partition image directly to the raw block device. | |
| Usage: | |
| sudo python3 ventoy-macos-install.py /dev/diskN [--exfat|--ntfs] [--ventoy-version VERSION] |
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: c 10:200 rwm
lxc.mount.auto: proc:rw sys:rw
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
| sudo nano /etc/modprobe.d/nvidia.conf | |
| blacklist nvidiafb | |
| blacklist nouveau | |
| ================================== | |
| sudo update-initramfs -c -d -u | |
| ================================== |
| echo "software by https://github.com/utkuozdemir/nvidia_gpu_exporter" | |
| wget https://github.com/utkuozdemir/nvidia_gpu_exporter/releases/download/v1.2.1/nvidia-gpu-exporter_1.2.1_linux_amd64.deb | |
| dpkg -i nvidia-gpu-exporter_1.2.1_linux_amd64.deb | |
| wget https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz | |
| tar xvfz node_exporter-*.*-amd64.tar.gz | |
| cd node_exporter-*.*-amd64 | |
| mv node_exporter /usr/local/bin/ | |
| useradd -rs /bin/false node_exporter | |
| echo "Creating systemd service file..." | |
| cat <<EOF | tee /etc/systemd/system/node_exporter.service > /dev/null | |
| [Unit] |
| systemctl stop pve-cluster corosync | |
| pmxcfs -l | |
| rm /etc/corosync/* | |
| rm /etc/pve/corosync.conf | |
| killall pmxcfs | |
| systemctl start pve-cluster |
| cat /etc/modprobe.d/nvidia.conf | |
| blacklist nvidiafb | |
| blacklist nouveau | |
| ================================== | |
| update-initramfs -c -d -u | |
| ================================== | |
| dmesg | grep -i iommu | |
| dmesg | grep -e DMAR -e IOMMU |
| import socket | |
| import time | |
| server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) | |
| server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
| # Enable broadcasting mode | |
| server.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) | |
| server.settimeout(0.2) |
| import cv2 | |
| import numpy as np | |
| from datetime import datetime | |
| # datetime object containing current date and time | |
| now = datetime.now() | |
| dt_string = now.strftime("%d-%m-%Y_%H_%M_%S") | |
| print("date and time =", dt_string) |