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.
To do so, open the Command Palette (Ctrl+Shift+P) and enter Preferences: Open User Settings. Then set python.condaPath , which is in the Python extension section of User Settings, with the appropriate path.
You can also select a Python interpreter using the Python: Select Interpreter command from the Command Palette. To do so, press CMD + SHIFT + P , type Python, and choose Select Interpreter.
I followed up on Brett's answer and you can now do the following:
I hope this helps. More information is available here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With