Skip to content

Instantly share code, notes, and snippets.

@azidanit
azidanit / how_to_patch_nvidia_open_kernel_p2p.md
Created June 17, 2026 03:24
Enabling CUDA P2P on RTX 5060 Ti (Blackwell) with Open GPU Kernel Modules Patch (Guide and Troubleshooting)

Enabling CUDA P2P on RTX 5060 Ti (Blackwell) with Open GPU Kernel Modules Patch

Goal

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
@azidanit
azidanit / ventoy-macos-install.py
Created June 1, 2026 13:38 — forked from VladimirMakaev/ventoy-macos-install.py
Install Ventoy on a USB drive from macOS - no VM, no macFUSE, no Linux required. Writes GPT + boot code directly via Python.
#!/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]
@azidanit
azidanit / how_to_make_egress_tunnel.md
Created January 26, 2026 16:11
Deploy Egress Tunnel CF
@azidanit
azidanit / Got error when install cuda toolkit in proxmox VM gpu passthought.txt
Created February 17, 2025 03:19
Got error when install cuda toolkit in proxmox VM gpu passthought
sudo nano /etc/modprobe.d/nvidia.conf
blacklist nvidiafb
blacklist nouveau
==================================
sudo update-initramfs -c -d -u
==================================
@azidanit
azidanit / nvidia-gpu-node-exporter.bash
Created November 22, 2024 00:43
nvidia-gpu-node-exporter.bash
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
@azidanit
azidanit / node_exporter_setup.bash
Created November 22, 2024 00:39
node_exporter_setup
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]
@azidanit
azidanit / how_to_delete_pve_cluster_info.txt
Created November 21, 2024 23:32
How to delete pve cluster info
systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
@azidanit
azidanit / how_to_vfio_nvidia_passthrough_debian.txt
Created November 20, 2024 04:20
VFIO nvidia gpu passthrough linux VM proxmox
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)
@azidanit
azidanit / record_cam.py
Created June 24, 2022 15:30
record video from webcam with datetime filename
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)