WSL2 Ubuntu 20.04.3 LTS 内核映像:5.10.60.1-microsoft-standard-WSL2
我正在尝试根据此处的说明安装 CUDA:https ://ubuntu.com/blog/getting-started-with-cuda-on-ubuntu-on-wsl-2
docker: unrecognized service
运行命令时我收到一条消息sudo service docker stop
。我确实按照教程中的该命令的说明进行操作,并且运行结果sudo apt update && sudo apt install -y nvidia-docker2
似乎成功。我还尝试检查 docker 服务是否完全可用,service --status-all
但在结果中没有看到。
请帮我弄清楚如何正确安装 CUDA,我正在尝试为我正在从事的图像处理项目设置带有 GPU 支持的 opencv。
以下是我运行的上述命令的输出:
service --status-all
输出:
[ - ] apparmor
[ ? ] apport
[ - ] atd
[ - ] console-setup.sh
[ - ] cron
[ ? ] cryptdisks
[ ? ] cryptdisks-early
[ - ] dbus
[ ? ] hwclock.sh
[ + ] irqbalance
[ - ] iscsid
[ - ] keyboard-setup.sh
[ ? ] kmod
[ - ] lvm2
[ - ] lvm2-lvmpolld
[ - ] multipath-tools
[ + ] open-iscsi
[ - ] open-vm-tools
[ ? ] plymouth
[ ? ] plymouth-log
[ - ] procps
[ - ] rsync
[ - ] rsyslog
[ - ] screen-cleanup
[ - ] ssh
[ ? ] ubuntu-fan
[ + ] udev
[ - ] ufw
[ - ] unattended-upgrades
[ - ] uuidd
[ - ] x11-common
命令:
sudo apt update && sudo apt install -y nvidia-docker2
输出:
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/amd64 InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease
Hit:8 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
nvidia-docker2 is already the newest version (2.8.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.