ComfyUI/MEMEDECK.md
2025-03-03 20:49:24 +00:00

1.1 KiB

Commands to set up the environment.

Enable MIGs on NVIDA GPU

https://www.seimaxim.com/kb/gpu/nvidia-a100-mig-cheat-sheat

sudo nvidia-smi -i 0 -mig 1
sudo nvidia-smi mig -cgi 9,9 -C

Start comfy with MIGs

CUDA_VISIBLE_DEVICES=MIG-0 python main.py --port 5000 --listen 0.0.0.0 --cuda-device 0 --preview-method auto

Tunnel remote server port to local machine port

On the server

sudo nano /etc/ssh/sshd_config

# uncomment this line in the sshd_config file
GatewayPorts yes

Then restart the machine.

On your local machine

sudo ssh -i ~/.ssh/memedeck-monolith.pem -N -R 9090:localhost:8079 holium@172.206.15.40 

install autossh (maybe not needed)

brew install autossh
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -i ~/.ssh/memedeck-monolith.pem -N -R 9090:localhost:8079 holium@172.206.15.40

On the server

This is to allow the port to be accessed from the local machine.

sudo iptables -A INPUT -p tcp --dport 9090 -j ACCEPT