Hi everyone,
I am attempting to use a version of vmd containerized with docker, pulled from the nvidia gpu cloud’s container repository, however, I cannot get vmd to run graphically from within the container. I can only see the vmd command line. While vmd works perfectly well within the container if I use tcl scripting, I am completely unable to run vmd through the graphical interface. It would be hugely appreciated if anyone can provide me some advice on solving this problem.
The docker image name, and the command to run the image per nvidia’s instructions are as follows:
Image Name: nvcr.io/hpc/vmd:cuda9-ubuntu1604-egl-1.9.4a17
Command to pull image:
docker pull nvcr.io/hpc/vmd:cuda9-ubuntu1604-egl-1.9.4a17
Command to get to container’s bash:
nvidia-docker run -it --rm -v $(pwd):/workspace nvcr.io/hpc/vmd:cuda9-ubuntu1604-egl-1.9.4a17 /bin/bash
Command to run vmd directly without going through bash:
nvidia-docker run -it --rm -v $(pwd):/workspace nvcr.io/hpc/vmd:cuda9-ubuntu1604-egl-1.9.4a17 /opt/vmd/bin/vmd -dispdev openglpbuffer
These commands, however, do not suffice to launch the vmd container in graphical mode, since there is no way for the container to access the native display. To circumvent this issue, I instead launched the container using the following commands to enable X-forwarding (enables the container to see the host’s display):
First:
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e ‘s/^…/ffff/’ | xauth -f $XAUTH nmerge -
xhost +local:docker
Then:
nvidia-docker run -it --rm -v $(pwd):/workspace
-v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth
-v $(pwd):/work -e XAUTHORITY=/tmp/.docker.xauth -e DISPLAY=:$DISPLAY
nvcr.io/hpc/vmd:cuda9-ubuntu1604-egl-1.9.4a17 /bin/bash
After completing these steps, I was able to download a few GUI applications from within the container, and ran them perfectly with no issue, thus proving that the container was 100% capable of running GUI applications on my screen. Downloading geany from within the container and running it resulted in a perfectly normal, gui-based application showing up on my display.
However, vmd STILL will not show up graphically (only the terminal style vmd shows up). This indicates to me that somehow, the vmd installed in the container is lacking some component to enable the graphical interface. Any ideas about what could be causing this issue, or how to fix it would be incredibly helpful. If this feature is still under development and the current version is not intended to run graphically, is there any way I could extend the container to get the graphical features to work? Thanks in advance!
Best,
Matt