Docker Support (Beta)

Docker support is experimentarily implemented. Here the basic knowledge about docker is assumed.

Dockerfile

The Dockerfile is under bin.

Create an image

Stable version

To create an image, you can use

docker build -t irfpy/sara -f bin/Dockerfile .

Create a development image

docker build -t irfpy/sara-dev -f bin/Dockerfile.dev .

Start jupyter

Jupyter notebook can be started as

docker run --rm -it -p 8888:8888 \
        -v /Volumes/scidata256/data:/Volumes/scidata/data \
        -v $(pwd):/data irfpy/sara \
        bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/data --ip=0.0.0.0 --port=8888 --no-browser --allow-root"

Here, the -p option maps the port, and the first part (before the colon) can be set as you like. The -v option mount the data folder and the working folder. The first part depends on the local setting.

Change irfpy/sara to irfpy/sara-dev for development image.

The prompt shows the token as follows. Connect to the server now.

http://127.0.0.1:8888/?token=8807e4ea827ec6183be8c9c609922b1aff9898aaf0be8f3e

Token is changed everytime.

Unit test

For the development image, the unittest can be run.

docker run --rm -it -v /Volumes/scidata/data:/Volumes/scidata/data irfpy/sara-dev \
        bash -c "cd /tmp && /opt/conda/bin/nosetests -c .nose.cfg"