Skip to content

compbiocore/nmrdock

Repository files navigation

NMRdock

NMR Docker Image Instructions

Docker Installation

Docker engine for Mac, Windows (Home),Windows (Pro, Educational, Enterprise), and Linux must be downloaded and installed in order to run the Docker Image.

NOTE: Docker Desktop does NOT work on Windows 10 Home Edition. Windows 10 Home Edition requires Docker Toolbox.

OSX

To run this image on OSX, a few steps must be taken to enable X11 interfacing between the container and the host machine. This requires the installation of XQuartz.

  1. Use Homebrew or MacPorts to install socat:

    brew install socat or port install socat

  2. With socat installed, open a terminal window and type:

    socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

  3. Leave the socat window open and open a new tab in terminal.

  4. Run the docker image by typing:

    docker run -it -v [path to a directory on local computer]:/home/ubuntu/data/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=x.x.x.x:0 compbiocore/nmrdock:latest /bin/bash

    where x.x.x.x is given by ifconfig getifaddr en0 and [path to a directory on local computer] can be set to your `pwd` or the directory of your data. To use the development branch NMRdock, replace latest with dev.

This can be done with the following script command:

#!/bin/csh

open -a "Terminal"
osascript -e 'tell application "Terminal" to do script "socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\\\"$DISPLAY\\\""'
set A = `ipconfig getifaddr en0`
set C = ":0 compbiocore/nmrdock:latest /bin/bash"
set B = "docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`:/home/ubuntu/data/ -w /home/ubuntu/data/ -e DISPLAY=$A$C"

exec $B

Windows

To run this image on Windows, a few steps must be taken to enable X11 interfacing between the container and the host machine. This requires the installation of VcXsrv Windows XServer.

  1. Open XLaunch by double clicking on the Desktop Icon.

  2. A window will appear for you to set configurations. Use the default options on the first two pages by pressing the next button.

  3. On the third page, select the box next "Disable access control" to ensure that the Docker has access to the XServer.

  4. Get your IP address using ipconfig

  5. Open Docker and execute docker run -it -v [path to a directory on local computer]:/home/ubuntu/data/ -e DISPLAY=x.x.x.x:0.0 compbiocore/nmrdock:latest /bin/bash

    where x.x.x.x is your IP address. To use the development branch NMRdock, replace latest with dev.

Linux

Most Linux distros have a native XServer that can be accessed by Docker. Docker can be run using the following command:

docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v [path to a directory on local computer]:/home/ubuntu/data/ compbiocore/nmrdock:latest /bin/bash

Some distros require DISPLAY to be defined:

docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v [path to a directory on local computer]:/home/ubuntu/data/ compbiocore/nmrdock:latest /bin/bash

To use the development branch NMRdock, replace latest with dev.

About

NMR docker image dockerfile

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •