用docker在tensorflow上调试的简单方法是什么?

问题描述 投票:0回答:1

我的本地计算机是Linux Mint Tricia,包括Docker和Visual Studio Code。

我通过此命令启动Docker容器。

$ docker run -it --name for_study -p 8888:8888 --mount type=bind,src=/home/evan/Projects,dst=/projects --gpus all tensorflow/tensorflow:1.14.0-gpu-py3

我的目的是调试可在docker上使用tensorflow的代码'/ home / evan / Projects'。>>

我的假设是将调试附加到此容器上的bash('for_study'),但我不知道如何附加。

我尝试过的事情:

我使用Visual Studio Code。-使用插件:Docker 1.1.0-使用插件:Remote-Containers 0.117.0

哪个选择?enter image description here

launch.json

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Python: Attach using Process Id",
            "type": "python",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]
}

[抱歉,我是Docker初学者。如果PyCharm Pro更简单,我会购买。

谢谢。

我的本地计算机是Linux Mint Tricia,其中包括Docker和Visual Studio Code。我通过此命令启动Docker容器。 $ docker run -it --name for_study -p 8888:8888 --mount type = bind,src = / ...

docker tensorflow visual-studio-code pycharm
1个回答
0
投票

已解决。

© www.soinside.com 2019 - 2024. All rights reserved.