edit · print · PDF

Please note that all the SIEpedia's articles address specific issues or questions raised by IAC users, so they do not attempt to be rigorous or exhaustive, and may or may not be useful or applicable in different or more general contexts.

I attemped to install Systemic on my iMac, which has the latest version of High Sierra (10.13.6). Neither the version for Mac, nor the one I managed to compile from the source code worked (the GUI opens up, but many functionalities are missing or do not work as expected). However, I had a successful installation of Systemic on my Linux desktop with Fedora 26, and at the end I was able to install it under a Docker container running on my iMac.

Here are the steps to follow (which I suppose can be easily adapted for other Linux distros, for instance Ubuntu).

Note: this is my very first docker experience, so there may be some inconsistencies or things which perhaps could be dome in a more elegant or efficient way.

Install Systemic on Fedora 26

This is relatively easy. You must compile the code from source, paying attention to the following issues.

  1. The Makefile misses an important piece: see https://github.com/stefano-meschiari/Systemic2/issues/19 for a description of the problem and the patch to fix it.
  2. A compilation error which can be fixed as described in https://github.com/stefano-meschiari/Systemic2/issues/23
  3. The rdyncall package: it is not in the standard R repositories, but can be installed with:
    install.packages("rdyncall", repos="http://R-Forge.R-project.org")
    (see https://github.com/stefano-meschiari/Systemic2/issues/17 for details).

This way you should have a working Systemic installation. It works fine with java v1.8 (openjdk version "1.8.0_171"), can't say if it works equally well with older or newer Java releases.

Install Docker on Mac

Now we must install Docker on the Mac. Just follow the instructions on https://docs.docker.com/docker-for-mac/install/. Probably you need to register on the Docker website to be able to download and run the installer.

Create docker image for Systemic

  • First step: download the image for Fedora 26:
    sudo docker pull fedora:26
  • Run it:
    docker run -it --name fedora26 fedora:26 bash
    This way we have launched a container based on the fedora26 image. This is a very basic, bare-metal fedora installation, and thus we need to install all the packages necessary to run Systemic. Luckily, the dnf command works out of the box, so we type:
    dnf install java-1.8.0-openjdk-devel wget 2ping libssh R-core R-devel openssh-clients rsync gcc gcc-gfortran emacs gsl-devel R-reshape2 R-stringi R-htmltools R-rmarkdown R-markdown R-gplots R-rlang R-xterm
    (hopefully I haven't forgot any)
  • Install the rdyncall R package. Launch R and type:
    install.packages("rdyncall", repos="http://R-Forge.R-project.org")
  • Create a directory where will mount the Systemic directory for Fedora 26. For simplicity we'll call it /opt/Systemic/
    mkdir -p /opt/Systemic
  • Exit from the container (just type exit), and save all the changes we made into a new image:
    docker commit <name of container>
    where <name of container> is the name we used in the docker run instructions, in this case fedora26.
  • Check what images we have.
    docker images
    There is a new one with no name; we'll assign it a name with:
    docker tag <image tag> i_systemic
    where <image tag> is the tag displayed by the docker images command. I use the "i_" prefix to indicate clearly that it's an image (see https://www.quora.com/What-is-difference-between-image-and-container-in-docker-world for an explanation of what images and containers are).
  • To see what containers we have, use:
    docker containers ls -a

Make a local copy of Systemic on the Mac

We need to have a copy of the Systemic installation in the Mac. We use rsync to retrieve the files from the fedora box with the Systemic installation, which will copy into /Users/mac_username/Systemic-fed26/:
rsync -auv --progress linux_username@fedorabox:/path/to/Systemic/ /Users/mac_username/Systemic-fed26/
where of course mac_username and linux_username must be replaced with the actual values, and fedorabox must be replaced by the name (or IP) of the fedora box. We might want to edit the file prefs.txt to change the BROWSER_DIR value to reflect the new path.

Launch the Systemic Docker container

Before doing it, we need to make sure that the docker container can open a terminal or a GUI on the Mac host machine. This is well explained in https://sourabhbajaj.com/blog/2017/02/07/gui-applications-docker-mac/.

We are now ready to launch the container. Open a X11 terminal (launch XQuartz if necessary) and from type:
docker run -it --name c_systemic -e DISPLAY=NNN.NNN.NNN.NNN:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /Users/mac_username/Systemic-fed26:/opt/Systemic i_systemic xterm
(this means that we deploy a container called c_systemic, which is based on image i_systemic, and will execute the xterm command; NNN.NNN.NNN.NNN is the IP obtained in the previous step).
The -v dir_host:dir_docker qrgument mounts the dir_host directory (on the host system) on dir_docker (on the docker container)

The advantage of this is that all files saved in the /opt/Systemic directory will be actually saved on /Users/mac_username/Systemic-fed26, so they won''t be lost when the docker container is closed.

If everything went well, we now have a new xterm terminal. From there we go to the Systemic directory and launch it using the shell script:
cd /opt/Systemic/
./Systemic.sh

The Systemic's GUI should deploy. After installing some possible missing R packages, it should be ready to be used.

edit · print · PDF
Page last modified on September 03, 2018, at 05:13 PM