neurodocker
neurodocker copied to clipboard
VNC Not Starting Up Properly?
Hello,
I'm new to docker (and neurodocker), I'm trying to run the VNC image I created, but it seems to exit everytime I start it.
I'm not quite sure what's going on, but here's what I did:
sudo docker run --rm repronim/neurodocker:0.7.0 generate docker --base=debian:buster --pkg-manager=apt --vnc passwd=hunter2 start_at_runtime=true geometry =1920x1080 --install xterm > Dockerfile
sudo docker build -t vncnogpu0stretch .
No obvious errors here as far as I can tell. If I run it with debian:stretch
I get the same results as what will follow.
sudo docker run --rm -it -p 5901:5901 vncnogpu0stretch xterm
And I get:
TightVNC Server version 1.3.9
Usage: vncserver [<OPTIONS>] [:<DISPLAY#>]
vncserver -kill :<DISPLAY#>
<OPTIONS> are Xtightvnc options, or:
-name <DESKTOP-NAME>
-depth <DEPTH>
-geometry <WIDTH>x<HEIGHT>
-httpport number
-basehttpport number
-alwaysshared
-nevershared
-pixelformat rgb<NNN>
-pixelformat bgr<NNN>
See vncserver and Xtightvnc manual pages for more information.
I tried running sudo docker ps
to see if it was up and running and this is what I got
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
So I don't think it's running... And when I tried connecting to 127.0.0.1:5901 in my VNC client it says that the host can't be found.
Fyi here is what I get when I run sudo docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
vncnogpu0stretch latest 474140485e39 12 minutes ago 278MB
vncnogpu latest b5bc65b85abc 35 minutes ago 392MB
vnc/vnc.no.gpu 1.0 b5bc65b85abc 35 minutes ago 392MB
debian stretch f9d06e40f53a 4 weeks ago 101MB
debian buster 6d6b00c22231 4 weeks ago 114MB
repronim/neurodocker 0.7.0 0b700323c695 9 months ago 81.5MB
Dear @N-Accumbens,
I had similar problems before and couldn't solve them in neurodocker, so we build an image with VNC integrated and lot's of neuroapplications build using neurodocker. Maybe that solves your problem? https://github.com/NeuroDesk/vnm/
I hope this helps Cheers Steffen
Dear @N-Accumbens,
I had similar problems before and couldn't solve them in neurodocker, so we build an image with VNC integrated and lot's of neuroapplications build using neurodocker. Maybe that solves your problem? https://github.com/NeuroDesk/vnm/
I hope this helps Cheers Steffen
Hi Steffen,
Thanks for getting back to me. Well, my main motivation in using neurodocker was in having a modular dockerfile (template) that I could easily understand and modify to my purposes, so I'm not sure if NeuroDesk fits the bill...
It's helpful to hear that you're having similar issues, do you think you could share the Dockerfile/scripts that you used to get your container's VNC working.
Dear @N-Accumbens
We use this container as a base image and then we use neurodocker to add neuro-applications inside subcontainers: dorowu/ubuntu-desktop-lxde-vnc:focal
here is a more info about it: https://github.com/fcwu/docker-ubuntu-vnc-desktop
you should be able to use it as well as base and then add your specific tools.
If you quickly want to test if Neurodesk already has the applications you want you could try this: sudo docker run --privileged --name vnm -v ~/vnm:/vnm -v /dev/shm:/dev/shm -e USER=neuro -p 6080:80 -p 5900:5900 vnmd/vnm:20210109 -> all possible applications can be found in the Application menu
Cheers Steffen
Hi @stebo85,
Sorry about the late reply. Thanks for the link, I'll take a look at it.
Using NeuroDocker to add neuro-applications sounds ideal and is vaguely what I'm envisioning. But why a shift to a whole other VNC instead of repairing NeuroDocker's default VNC?
@N-Accumbens I tried to get it to work, but wasn't successful so I looked around how others did it and found this very nice base image that solved all my problems.
@stebo85 So I was browsing around and I was wondering if this solution was considered?
https://www.geeksforgeeks.org/running-gui-applications-on-docker-in-linux/
In other words, instead of using a VNC/RDP into the container, hook it up Linux's Display Server.
I'm assuming it wasn't pursued since it would probably only work on Linux hosts, but I'm wondering if there were any other reasons?
@N-Accumbens, correct - the VNM container (https://github.com/NeuroDesk/vnm/) we build is intended for Windows users that do not have an x-server installed. If you have an x-server installed (e.g. vcxsrv on windows or running on Linux) one can skip the VNM container and use NeuroDesk (https://github.com/NeuroDesk/neurodesk) directly :)
if there is still interest in this, please feel free to reopen