10

I currently have a tensorflow-gpu docker container fully built. I have a volume from my host's workspace ($PWD) to /workspace inside the docker container.

I can successfully remote debug the python scripts inside my workspace/docker's workspace folder, but as expected, my pylint and intellisense don't work inside vscode, as the pythonPath is set to my local python interpreter, and the pylint init-hooks are using my local python environment to figure out if it should squiggly line something.

How do I change my local vscode's pythonpath to point to the python interpreter on docker rather than on the host? I want pylint to be calibrated to the docker's environment rather than the local host's environment.

1
  • 1
    If you have any links to references that helped you make your VSCode target the python environment inside the docker container for running and debugging, it would be great if you could link them... this is killing me! Commented Mar 10, 2019 at 2:13

2 Answers 2

4

I followed up on Brett's answer and you can now do the following:

  1. Install the remote-containers extension.
  2. Click "shift+command(ctrl)+p" and type and select "remote-containers: open folder in remote docket container"

I hope this helps. More information is available here:

Sign up to request clarification or add additional context in comments.

1 Comment

Could you be a bit specific about the folder you need to open. I infer that it would be a volume pointing to the container's python libraries (say /usr/local/lib/python3.5). Is it the case?
2

What you want is remote interpreter support which isn't supported yet. Please subscribe to this issue to know the status of this feature.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.