Useful Gpu Server/docker Commands

Photo by me

Some useful linux commands for GPU server and docker deployment

Show container logs realtime

1
2
3
docker logs -f --until=2s container-name

docker logs --tail=0 --follow container-name

Show Nvidia GPU usage realtime

1
watch -n 1 nvidia-smi

Run docker with gpu and always auto restart if fails

1
docker run -d --gpus all --restart=always -it -p 80:80