简体   繁体   English

Jetson TX2 上的 Tensorflow 导入导致分段错误(核心转储)

[英]Tensorflow import on Jetson TX2 results in Segmentation fault (core dumped)

I followed this installation tutorial ( https://devtalk.nvidia.com/default/topic/1038957/tensorflow-for-jetson-tx2-/ ) on a Jetson TX2 right after flashing it with Jetpack 4.2.2.在使用 Jetpack 4.2.2 刷新 Jetson TX2 后,我在 Jetson TX2 上遵循了这个安装教程( https://devtalk.nvidia.com/default/topic/1038957/tensorflow-for-jetson-tx2-/ )。 I'm using the default python 3.6.8.我正在使用默认的 python 3.6.8。

When I open a python3 terminal and import tensorflow, the terminals waits for a few seconds then prints "Segmentation fault (core dumped)".当我打开 python3 终端并导入 tensorflow 时,终端等待几秒钟然后打印“分段错误(核心转储)”。

There were no error messages during the install.安装过程中没有错误消息。 Any help would be greatly appreciated, thank you.任何帮助将不胜感激,谢谢。

Notes: I noticed looking here ( Which TensorFlow and CUDA version combinations are compatible? ) that tensorflow 1.14 will only work with cuDNN 7.4, but by default the sdkmanager installs cuDNN 7.5.注意:我注意到在这里看( TensorFlow 和 CUDA 版本组合是兼容的? )tensorflow 1.14 仅适用于默认的 7.5d CUDNN 安装。

If you are using docker on 4.2.2 and have this issue:如果您在 4.2.2 上使用 docker 并遇到此问题:

Since you have seemed to check all the compatibility issues, I would suggest checking if docker is running the correct runtime.由于您似乎检查了所有兼容性问题,我建议检查 docker 是否运行正确的运行时。 If your /etc/docker/daemon.json file looks like this:如果您的 /etc/docker/daemon.json 文件如下所示:

{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

change it to this to force docker to use the nvidia-runtime.将其更改为强制 docker 使用 nvidia-runtime。 For some strange reason it doesn't seem to use this if not specified, even though it is the only runtime apparently present.出于某种奇怪的原因,如果没有指定,它似乎不会使用它,即使它是唯一明显存在的运行时。

{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

Finally, for Jetpack 4.2.2, your docker version with docker --version should be:最后,对于 Jetpack 4.2.2,您的 docker 版本与docker --version应该是:

Docker version 18.09.7, build 2d0083d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM