-
Notifications
You must be signed in to change notification settings - Fork 1
Z historical 1.0 Running freeview (using OpenGL support DEPRECATED)
This page documents how to run the FreeSurfer GUI app, freeview
.
After much trial and error and searching, in particular here https://github.com/jessfraz/dockerfiles/issues/253#issuecomment-297210927 it seemed that one reliable method for avoiding the dreaded
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
errors whenever trying to run freeview
from within the container was to actually copy the NVIDIA installation file into the container and run the installation explicitly within the container itself. Note, that using the apt install ...
method resulted in the error above.
The current approach for OpenGL however explicitly ties the container image to a specific GPU driver and importantly the driver installation in the container MUST be the same version as the host. Given that, currently the container build will pull and install a specific version (440.64) of the NVIDIA driver.
Assuming appropriately set DATAIN
and DATAOUT
env variables, let's just run container with an --entrypoint
of /bin/bash
xhost +
docker run --runtime=nvidia -ti \
--entrypoint /bin/bash \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:$HOME/.Xauthority \
-e NVIDIA_VISIBLE_DEVICES=0 \
-e DISPLAY=$DISPLAY -h $HOSTNAME \
-v ${DATAIN}:/incoming \
-v ${DATAOUT}:/outgoing \
--env HOME --user $(id -u) \
--privileged --device /dev/dri \
fnndsc/pl-fshack
and now we can
cd /usr/local/freesurfer/bin
freeview &
Where the /incoming
dir in the container will correspond to `${DATAIN}.