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/util -f bin/Dockerfile .

Create a development image

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

Start jupyter

Jupyter notebook can be started as

docker run --rm -it -p 8888:8888 \
        -v $(pwd):/data irfpy/util \
        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/util to irfpy/util-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 irfpy/util-dev \
        bash -c "cd /tmp && /opt/conda/bin/nosetests -c .nose.cfg"