姑且把日志贴出来,大佬分析分析啥原因,会不是时间时区不一样?造成反映慢。。。
[I 16:29:45.604 NotebookApp] 302 GET /?token=99b4290f4d03e9fe537a7fe14872d20f2a50f8a23c81c247 (172.17.0.1) 0.55ms
[I 16:29:49.983 NotebookApp] Creating new notebook in
[I 16:29:50.024 NotebookApp] Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
[I 16:29:50.496 NotebookApp] Kernel started: 24d0d681-bfac-4723-9e73-541c5c4f2443
2021-11-25 16:30:05.794652: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer.so.6
2021-11-25 16:30:05.824203: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer_plugin.so.6
2021-11-25 16:30:29.686851: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2021-11-25 16:30:29.700683: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2303995000 Hz
2021-11-25 16:30:29.702117: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x484f3f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-11-25 16:30:29.702147: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-11-25 16:30:29.704570: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-11-25 16:30:30.076279: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:30:30.076510: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x48c1ac0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-11-25 16:30:30.076562: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA GeForce RTX 3060 Laptop GPU, Compute Capability 8.6
2021-11-25 16:30:30.077105: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:30:30.077137: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6
coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s
2021-11-25 16:30:30.077168: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-11-25 16:30:30.077183: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-11-25 16:30:30.111039: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-11-25 16:30:30.116390: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-11-25 16:30:30.162423: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2021-11-25 16:30:30.167253: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-11-25 16:30:30.167342: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-11-25 16:30:30.167733: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:30:30.167962: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:30:30.168006: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2021-11-25 16:30:30.168473: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
[I 16:31:50.494 NotebookApp] Saving file at /Untitled.ipynb
2021-11-25 16:33:20.133916: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-11-25 16:33:20.133958: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2021-11-25 16:33:20.133980: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2021-11-25 16:33:20.135139: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:33:20.135166: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Could not identify NUMA node of platform GPU id 0, defaulting to 0. Your kernel may not have been built with NUMA support.
2021-11-25 16:33:20.135374: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:33:20.135442: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/device:GPU:0 with 4788 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 3060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6)
2021-11-25 16:33:20.152265: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:33:20.152312: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6
coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s
2021-11-25 16:33:20.152357: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-11-25 16:33:20.152377: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-11-25 16:33:20.152406: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-11-25 16:33:20.152427: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-11-25 16:33:20.152446: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2021-11-25 16:33:20.152484: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-11-25 16:33:20.152507: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-11-25 16:33:20.152726: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:33:20.152927: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:33:20.152951: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
[I 16:33:51.283 NotebookApp] Saving file at /Untitled.ipynb
2021-11-25 16:35:09.708118: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:35:09.708166: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6
coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s
2021-11-25 16:35:09.708200: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-11-25 16:35:09.708219: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-11-25 16:35:09.708245: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-11-25 16:35:09.708253: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-11-25 16:35:09.708289: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolveeerer.eeeeer.so.10
2021-11-25 16:35:09.708310: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-11-25 16:35:09.708317: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-11-25 16:35:09.708564: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:35:09.708926: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:35:09.708955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2021-11-25 16:35:09.709019: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-11-25 16:35:09.709023: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2021-11-25 16:35:09.709027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2021-11-25 16:35:09.709380: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:35:09.709410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Could not identify NUMA node of platform GPU id 0, defaulting to 0. Your kernel may not have been built with NUMA support.
2021-11-25 16:35:09.709641: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:967] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2021-11-25 16:35:09.709682: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4788 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 3060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6)
安装WSL2,官方文档说的比较清楚了
- https://docs.microsoft.com/zh-cn/windows/wsl/install
5步搭建wsl2+cuda+docker解决windows深度学习开发问题
- https://zhuanlan.zhihu.com/p/408403790
Windows+WSL2+CUDA+Docker
- https://blog.csdn.net/fleaxin/article/details/108911522
tensor flow 官方gpu 支持文档
- https://tensorflow.google.cn/install/gpu
cuda 官方指导
- https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/
本文主要参考:CUDA on WSL User Guide
- https://docs.nvidia.com/cuda/wsl-user-guide/index.html
11.5 版本的文档有docker 说明
- https://docs.nvidia.com/cuda/archive/11.5.0/wsl-user-guide/index.html#ch05-running-containers
启用 WSL2
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachineP
本流程在Windows 11下进行,也适用于最新版本的Windows 10。基于Windows操作系统,对于日常使用和同时使用多个其他的开发环境更加友好,上手难度低;而基于Linux的深度学习,生态成熟且案例也更多,因此WSL2是一个非常不错的选择。同时本文兼顾了基于Cuda的深度学习开发。
在《物体检测快速入门系列(2)-Windows部署GPU深度学习开发环境》一文中已经描述了如何在Windows环境下部署GPU深度学习开发环境,但是要我推荐的话,我还是倾向于docker环境,无需安装cuda、cuDNN,docker镜像安装完毕后,就都好了,一键部署好之后,可以随意迁移,再也不用环境发愁了............................
目录背景问题解决方法
已经配置好了wsl2和docker desktop,因C盘空间不够卸载了Ubuntu20.04,后来又重新安装了Ubuntu20.04(nVidia-docker需要)
可以在powershell下使用docker,但是不能在Ubuntu下运行,提示如下
$ docker
Command 'docker' not found, but can be installed with:
sudo apt install docker.io
$ sudo apt ins
https://docs.nvidia.com/cuda/wsl-user-guide/index.html#installing-wip
1.wsl2安装
wsl2安装实际上非常简单,大体上来说可以分为两步
安装激活wsl2功能
其实这里可以直接参考官方的参考文档。但是其实这里我并没有直接使用命令就能成功,此处参考了另一个官方文档,成功安装了wsl2。
安装linux的发行版
linux发行版的安装在上面的官方教程里也有提到,其实就是直接到微软的应用商店下载安装对应的版本就行。(我这
以前捣鼓过wsl,即Windows下的Linux子系统,但兼容性依然比不过原生的Linux系统,使用cmake等命令会出现奇怪的问题。最近听说wsl2出来了,而且也可以在wsl上安装nvidia显卡驱动了,有网友实测跑深度学习模型速度能比Windows的快一倍左右,哈哈这就必须得捣鼓捣鼓了,如果兼容性真的没问题的话,那可比虚拟机或双系统要爽多了~
原因:can't create unix socket /var/run/docker.sock: is a directory/var/run/docker.sock是一个目录,导致docker启动失败解决过程:删除docker.sock目录,service docker start 启动docker服务启动过程好像出现了长时间的阻塞,后不得已强制结束,Ctrl+c查看/var/run/目录下已...
基于docker在Ubuntu上搭建TensorFlow-GPU计算环境
由于实验室的服务器有多人共享使用,而不同人的代码对应的keras和tensorflow版本不一致,所以对应的cuda版本也不相同,因此,考虑使用docker安装自己的容器,这样就可以避免共享cuda版本不一致造成的麻烦。(不过有贴子说使用docker的话,GPU性能只能发挥80%,所以有利有弊吧)
安装docker
首先,检...