Last Update: 21/11/20
CUDA out of memory
- Kill dead processes;
# replace '*' with 0, 1, ..., find running $PID
lsof /dev/nvidia*
kill -9 $PID
- reload Nvidia driver;
# Reload without rebooting
# close display management
systemctl isolate multi-user.target
# disable nvidia driver(if returns relying on xxx,rmmod them as well)
rmmod nvidia
# load nvidia driver
modprobe nvidia
# restart display management
systemctl start graphical.target
Or
sudo apt install nvidia-modprobe
- Reboot.
Docker Run without Root
sudo chmod a+rw /var/run/docker.sock
Docker Nvidia Runtime
Install Nvidia Container Runtime
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install nvidia-container-runtime
Modify Config
sudo vim /etc/docker/daemon.json
# /etc/docker/daemon.json
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia"
}
Reload docker
sudo systemctl daemon-reload
sudo systemctl restart docker
Mount WebDav as 777
sudo apt install davfs2
sudo mount -t davfs http://your-url-of-webdav/ /your/mount/point/path -o uid=$YOURUID,gid=$YOURGID,dir_mode=0777,file_mode=0777
Mount Disk as 777
# find target disk, like /dev/sda or /dev/sda1
sudo fdisk -l
# mount once. file permission is (777-umask)
sudo mount /dev/your-disk /your/mount/point/path -o umask=000
# mount as startup
# find $UID, like 3e395c6c-8e04-4bd6-93cd-1152fa797262
sudo blkid /dev/your-disk
sudo vim /etc/fstab
# /etc/fstab
# add line
UID=$UID /your/mount/point/path ext4 auto,exec,user,rw,umask=000 0 0