A Visual Debugger for DVM-DOS-TEM in Docker Container on GCP Instance #687
Benjamin-Maglio
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Approximately 6 months ago @rarutter added
/.vscode
to the repository in commit927978c
which contained alaunch.json
file, enabling the use of a visual debugger in Visual Studio Code when running the model from within a Docker Container. This provides a powerful utility for debugging and development of DVM-DOS-TEM. However, as many users work primarily on cloud-based VMs, there was an extra layer of complexity to use this feature, requiring a remote-ssh into the instance, and then mounting to a running container, which we think we have solved.General vscode setup instructions for host machine to docker container (
host
->docker
):host
Remote-Containers:Attach to Running Container
- this will list all running containersContainer dvmdostem-dev
etcdocker
containerMore information on debugging using this platform can be found here.
Subsequently, setup for vscode for
host
->cloud-instance
as follows:host
cloud-instance
(for GCP see this)cloud-instance
is running, and select this (you may need to reconfigure your .ssh config file, see this)cloud-instance
Finally, to setup the visual debugger for
host
->cloud-instance
->docker
:cloud-instance
using the previous steps, you will need to make some accessibility changes on thecloud-instance
, you can do this in the terminal of vscode or from whichever method (browser, ssh) you normally access youcloud-instance
cloud-instance
are runningsudo groupadd docker
thensudo usermod -aG docker $USER
on youcloud-instance
(but not insidedocker
) to allow for commands to be made without being a super user (usenewgrp docker
or log out/in to activate changes)cloud-instance
remotehost
, using remote-ssh to accesscloud-instance
and attached todocker
container on thecloud-instance
docker
oncloud-instance
and you should be able to begin debugging as in the intial set of instructions.Note: due to the multiple ssh layers connection is slow, you may need to change the refresh rate to something longer than the default with
docker.explorerRefreshInterval
following this.Beta Was this translation helpful? Give feedback.
All reactions