美文网首页
docker使用tensorflow-gpu

docker使用tensorflow-gpu

作者: 你说你要一场 | 来源:发表于2019-08-07 18:26 被阅读0次
Systemd drop-in file
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --host=fd:// --add-runtime=nvidia=/usr/bin/nvidia-container-runtime
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Daemon configuration file
sudo tee /etc/docker/daemon.json <<EOF
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
EOF
sudo pkill -SIGHUP dockerd
sudo systemctl daemon-reload
sudo systemctl restart docker

docker run -it --rm --runtime=nvidia tensorflow/tensorflow:latest-gpu-py3 python

参考自:https://www.jianshu.com/p/14f9fc36b4ef

相关文章

网友评论

      本文标题:docker使用tensorflow-gpu

      本文链接:https://www.haomeiwen.com/subject/xppadctx.html