Hi,
This is my solution to coping the models and docker images between cluster nodes.
I moved the contents for hugging face folder of the workers nodes to another folder and deleted the entire hugging face folder from all workers. I kept only the hugging face folder on the head node.
In the head node I edited the export file to add nfs shares for every worker. Because I am not using switch it is two lines, but if you have two sparks or a switch then you will have one line. Use the IP of the connectx interfaces for speed not the WiFi or the Ethernet.
Replace your username and IP address for marked area with brackets {}
sudo nano /etc/exports
Add the following
/home/{your username}/.cache/huggingface 192.168.187.1/24(rw,sync,no_subtree_check,no_root_squash)
/home/{your username}/.cache/huggingface 192.168.177.1/24(rw,sync,no_subtree_check,no_root_squash)
Save the file then apply it
sudo exportfs -a -v
Then go to every worker node and mount the nfs share at the hugging face cache location.
sudo nano /etc/fstab
Add this line
{Connectx IP of head node}:/home/{your username}/.cache/huggingface /home/{your username}/.cache/huggingface nfs defaults,_netdev,noauto,x-systemd.automount 0 0
Save the file then apply the changes
sudo mount -a
Do this for all workers nodes.
Now you don’t need to copy the model every time.
Also you can copy the unused models using normal cp command to local folders In worker nodes to have more capacity.
For docker images I use the following ssh command to copy and load the images to workers nodes using their connectx IP
First I run “docker image ls” to list all available images on head node. Then I run ssh copy like this example
docker save ghcr.io/anemll/dspark-vllm-gx10:0.1.1 | ssh -c aes128-gcm@openssh.com -o Compression=no 192.168.187.13 "docker load"
If you have better way of doing this please share it.