great-northern-diver / loon

A Toolkit for Interactive Statistical Data Visualization
http://great-northern-diver.github.io/loon/
GNU General Public License v2.0
48 stars 16 forks source link

installation on verse docker image fails #4

Closed reikoch closed 6 years ago

reikoch commented 7 years ago

Trying to install from RStudio running in rocker/verse image 0f53987ba185 fails with message

 .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/library/tcltk/libs/tcltk.so':
libtcl8.6.so: cannot open shared object file: No such file or directory
Error : package ‘tcltk’ could not be loaded
ERROR: lazy loading failed for package ‘loon’

I can find tcltk.so in /usr/local/lib/R/library/tcltk/libs/tcltk.so but nowhere tcltk8.6.so. I maybe a an installation script not precise enough - or a symlink needed?

epijim commented 6 years ago

Hi @waddella, I just ran into the same issue. I don't think it's tied to your package though.

waddella commented 6 years ago

Hello @reikoch and @epijim,

Loon does not work by default in dockers because it requires X forwarding. You can read the following blog post on X forwarding. I was able to run loon with this Dockerfile (saved in a folder loonr):

FROM rocker/verse
Maintainer Adrian Waddell <adrian@waddell.ch>
RUN apt-get update \
    && apt-get install -y libtk8.6 libtcl8.6 libtk-img \
          mesa-common-dev libglu1-mesa-dev freeglut3-dev \
          libssl-dev libcurl4-gnutls-dev libtk-img libxml2-dev\
    && . /etc/environment \
    && install2.r -e -r $MRAN -- --no-test-load loon \
    && install2.r -e -r $MRAN RnavGraphImageData rworldmap \
       kernlab

and then by running

SESSIONXAUTH=${XAUTHORITY:-$HOME/.Xauthority}
DOCKER_XAUTH=${SESSIONXAUTH}.docker
cp --preserve=all $SESSIONXAUTH $DOCKER_XAUTH
echo "ffff 0000  $(xauth nlist $DISPLAY | cut -d\  -f4-)" \
| xauth -f $DOCKER_XAUTH nmerge -

docker build -t waddella/loonr .

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v $DOCKER_XAUTH:$DOCKER_XAUTH -e XAUTHORITY=$DOCKER_XAUTH -e DISPLAY=$DISPLAY waddella/loonr /bin/bash R

I will try to publish an image on docker cloud one of these days.