我正在使用谷歌云提供的预构建深度学习 VM 实例,并连接了 Nvidia tesla K80 GPU。我选择自动安装 Tensorflow 2.5 和 CUDA 11.0。当我启动实例时,一切正常 - 我可以运行:
Import tensorflow as tf
tf.config.list_physical_devices()
Run Code Online (Sandbox Code Playgroud)
我的函数返回 CPU、加速 CPU 和 GPU。同样,如果我运行tf.test.is_gpu_available(),该函数返回 True。
但是,如果我注销,停止实例,然后重新启动实例,运行完全相同的代码只会看到 CPU 并tf.test.is_gpu_available()导致 False。我收到一个错误,看起来驱动程序初始化失败:
E tensorflow/stream_executor/cuda/cuda_driver.cc:355] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
Run Code Online (Sandbox Code Playgroud)
运行 nvidia-smi 显示电脑还是能看到 GPU,但是我的 tensorflow 看不到。
有谁知道是什么原因造成的?我不想在重新启动实例时重新安装所有内容。
我有一个正在运行的 Google 深度学习 VM,我设置了一个 SSH 隧道,当我导航到http://localhost:8080时,我连接到正在运行的 Jupyter Lab 实例。运行命令sudo service jupyter status,告诉我服务运行正常。
现在,我想使用 Visual Studio Code 连接到 Jupyter 实例。我尝试了 [Ctrl]+[Shift]+[P] 和“Python:指定 Jupyter 服务器 URI”,并在出现的提示中输入http://localhost:8080 。但是,我收到一条错误消息:
Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified.
http://localhost:8080/
Error: Failed to connect to password protected server. Check that password is correct.
Run Code Online (Sandbox Code Playgroud)
不幸的是,文档并没有说太多。
有人有将 VSCode 连接到远程服务器的经验吗?谢谢。
是否有类似findorgrep的命令可用于搜索我的 Google 存储桶?
我只能找到ls,但这并不是我所需要的。我想搜索包含特定字符串或匹配特定正则表达式的特定文件夹名称和文件名。
我在 GCP 和 AI Platform (Jupyterlab) 方面遇到了一些问题,似乎无法长时间与服务器保持稳定的连接。我不断收到“服务器连接错误”消息。从那里有两种可能性:
有时,当我在(重新)启动实例后运行第一个单元时,就会发生这种情况,有时会晚一点。我能够在笔记本上工作而没有任何问题的最长稳定时间是 20、30 分钟左右,这非常烦人。
我的主实例的配置: - 16 个 CPU - 60GB RAM - P100 NVIDIA GPU
我尝试过不同类型的实例,一直遇到同样的问题,家里网络稳定。
google-cloud-platform google-cloud-ml jupyter-lab google-dl-platform gcp-ai-platform-notebook
这个问题发生在我今天重新启动我的云笔记本服务器时。可以使用以下步骤重现:
使用 Tensorflow 或 Pytorch 和 GPU 创建 Google Cloud Notebook 服务器
启动服务器后,打开python控制台:
>>> import torch
>>> torch.cuda.is_available()
True
Run Code Online (Sandbox Code Playgroud)
CUDA 设备目前可用。
>>> import torch
>>> torch.cuda.is_available()
/opt/conda/lib/python3.7/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/conda/conda-bld/pytorch_1614378098133/work/c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False
Run Code Online (Sandbox Code Playgroud)
nvidia-smi 命令工作正常。
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: …Run Code Online (Sandbox Code Playgroud) google-cloud-platform pytorch google-dl-platform gcp-ai-platform-notebook
我最近引用了 Google Cloud 的深度学习 VM。DLVM 提供了指向我们虚拟机的 jupyter 笔记本的链接,但是当我将该链接粘贴到浏览器时,它给了我们错误 502(错误网关)。
\n\n该虚拟机由 100 GB 内存、4 个 vCPU(26 GB 内存)和 2 个 Tesla T4 GPU 组成。我多次尝试停止并重新启动实例,但没有成功。
\n\nJupyter Notebook 的链接由“入门”页面给出的命令提供:
\n\ngcloud compute instances describe --project <project-id> --zone <zone-id> <instance-id> | grep googleusercontent.com | grep datalab\nRun Code Online (Sandbox Code Playgroud)\n\n该命令成功地给了我一个链接。
\n\n但是,当我将链接粘贴到浏览器时,它给了我一个错误,如下所示:
\n\n错误 502(网关错误)!!\n502。那\xe2\x80\x99 是一个错误。\n\n\xe2\x80\x99 就是我们所知道的一切。
\n