Saturday, 7 July 2018

Running/Debugging Pycharm Python Scripts with remote Docker Machine

I'm using a remote workstation (Ubunutu 18.04) with a GPU via Docker Machine. With PyCharm Professional 2018.1.4 I can connect remotely to the workstation and create/start containers, connect to them and attach a terminal.

The problem occurs when I try to run a python script via docker compose with PyCharm. I get the error:

python: can't open file '/opt/project/testing.py': [Errno 2] No such file or directory

I have the following docker-compose file:

version: '3'
services:
  densepose:
    build: Dockerfile
    image: densepose
    volumes:
      - ./:/opt/project # I have tried adding and removing this to no avail
      - ./included_files:/included_files
      - ./output:/output

And I am using the Dockerfile from here

I have tried using both Ubuntu 17.10 and Windows 10 with PyCharm to connect to the remote station to do this but I receive the same error.



from Running/Debugging Pycharm Python Scripts with remote Docker Machine

No comments:

Post a Comment