├── docker ├── ck │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── .cm │ ├── alias-a-ck │ ├── alias-u-c2a48eabc0918fea │ ├── alias-a-ck-web-server │ ├── alias-u-0ae19441aabce562 │ ├── alias-a-ck-crowdtune-gcc │ ├── alias-a-ck-crowdtune-llvm │ ├── alias-a-ck-ubuntu-16.04 │ ├── alias-a-ck-ubuntu-17.04 │ ├── alias-a-ck-ubuntu-18.04 │ ├── alias-u-2ad0194934a99875 │ ├── alias-u-5b3ea2e4ebf8ba7f │ ├── alias-u-927a17ac3f00088a │ ├── alias-u-9dd97f6d00c460cd │ ├── alias-u-ab4db058845a3e02 │ ├── alias-a-ck-interactive-article │ ├── alias-u-74b62bf7222a67bd │ ├── alias-a-ck-interactive-article-cmd │ └── alias-u-7bd4d418efee6f25 ├── ck-ubuntu-16.04 │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── ck-ubuntu-17.04 │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── ck-ubuntu-18.04 │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── ck-web-server │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ └── Dockerfile ├── ck-crowdtune-gcc │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── ck-crowdtune-llvm │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── Dockerfile ├── ck-interactive-article │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ └── Dockerfile └── ck-interactive-article-cmd │ ├── .cm │ ├── desc.json │ ├── info.json │ └── meta.json │ └── Dockerfile ├── module ├── docker │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ ├── meta.json │ │ └── updates.json │ └── module.py └── .cm │ ├── alias-a-docker │ └── alias-u-88eef0cd8c43b68a ├── .cm ├── alias-a-docker ├── alias-a-module ├── alias-u-032630d041b4fd8a └── alias-u-88eef0cd8c43b68a ├── COPYRIGHT ├── .gitignore ├── .ckr.json ├── CONTRIBUTIONS ├── CHANGES ├── AUTHORS ├── LICENSE └── README.md /docker/ck/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /module/docker/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.cm/alias-a-docker: -------------------------------------------------------------------------------- 1 | 88eef0cd8c43b68a 2 | -------------------------------------------------------------------------------- /.cm/alias-a-module: -------------------------------------------------------------------------------- 1 | 032630d041b4fd8a 2 | -------------------------------------------------------------------------------- /.cm/alias-u-032630d041b4fd8a: -------------------------------------------------------------------------------- 1 | module 2 | -------------------------------------------------------------------------------- /.cm/alias-u-88eef0cd8c43b68a: -------------------------------------------------------------------------------- 1 | docker 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck: -------------------------------------------------------------------------------- 1 | c2a48eabc0918fea 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-c2a48eabc0918fea: -------------------------------------------------------------------------------- 1 | ck 2 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-16.04/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-17.04/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-18.04/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/ck-web-server/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-gcc/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-llvm/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /module/.cm/alias-a-docker: -------------------------------------------------------------------------------- 1 | 88eef0cd8c43b68a 2 | -------------------------------------------------------------------------------- /module/.cm/alias-u-88eef0cd8c43b68a: -------------------------------------------------------------------------------- 1 | docker 2 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | (C)opyright 2016 cTuning foundation 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-web-server: -------------------------------------------------------------------------------- 1 | 0ae19441aabce562 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-0ae19441aabce562: -------------------------------------------------------------------------------- 1 | ck-web-server 2 | -------------------------------------------------------------------------------- /docker/ck-interactive-article/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-crowdtune-gcc: -------------------------------------------------------------------------------- 1 | ab4db058845a3e02 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-crowdtune-llvm: -------------------------------------------------------------------------------- 1 | 5b3ea2e4ebf8ba7f 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-ubuntu-16.04: -------------------------------------------------------------------------------- 1 | 2ad0194934a99875 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-ubuntu-17.04: -------------------------------------------------------------------------------- 1 | 927a17ac3f00088a 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-ubuntu-18.04: -------------------------------------------------------------------------------- 1 | 9dd97f6d00c460cd 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-2ad0194934a99875: -------------------------------------------------------------------------------- 1 | ck-ubuntu-16.04 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-5b3ea2e4ebf8ba7f: -------------------------------------------------------------------------------- 1 | ck-crowdtune-llvm 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-927a17ac3f00088a: -------------------------------------------------------------------------------- 1 | ck-ubuntu-17.04 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-9dd97f6d00c460cd: -------------------------------------------------------------------------------- 1 | ck-ubuntu-18.04 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-ab4db058845a3e02: -------------------------------------------------------------------------------- 1 | ck-crowdtune-gcc 2 | -------------------------------------------------------------------------------- /docker/ck-interactive-article-cmd/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-interactive-article: -------------------------------------------------------------------------------- 1 | 74b62bf7222a67bd 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-74b62bf7222a67bd: -------------------------------------------------------------------------------- 1 | ck-interactive-article 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-a-ck-interactive-article-cmd: -------------------------------------------------------------------------------- 1 | 7bd4d418efee6f25 2 | -------------------------------------------------------------------------------- /docker/.cm/alias-u-7bd4d418efee6f25: -------------------------------------------------------------------------------- 1 | ck-interactive-article-cmd 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *tmp/ 3 | *.ipynb_checkpoints/ 4 | program/pluton-blas-*/tmp-ck-* 5 | -------------------------------------------------------------------------------- /.ckr.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_uid": "18bb3d4130a4aaf9", 3 | "data_name": "ck-docker", 4 | "dict": { 5 | "url": "https://github.com/ctuning/ck-docker", 6 | "shared": "git" 7 | }, 8 | "data_alias": "ck-docker", 9 | "data_uoa": "ck-docker" 10 | } 11 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-gcc/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-llvm/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /CONTRIBUTIONS: -------------------------------------------------------------------------------- 1 | Acknowledgments: 2 | 3 | N: Anton Lokhmotov 4 | E: anton@dividiti.com 5 | H: https://www.hipeac.net/~anton 6 | O: dividiti 7 | C: first implementation 8 | W: 9 | 10 | N: Grigori Fursin 11 | E: Grigori.Fursin@cTuning.org 12 | H: http://fursin.net 13 | O: cTuning foundation 14 | C: unification and extension (build and run) 15 | W: 16 | -------------------------------------------------------------------------------- /CHANGES: -------------------------------------------------------------------------------- 1 | * 2018.06.14 - added ck-ubuntu 18.04 2 | 3 | * 2018.05.30 - added save and import commands for ACM Digital Library, etc (to support ReQuEST workflows) 4 | 5 | * 2017.11.10 - added ubuntu 17.04 6 | 7 | * 2016.06.11 - major update (adding various images and push/login functions) 8 | 9 | * 2016.06.08 - major update of the docker module (adding build and run functions) 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | ======================================================================= 2 | N: Anton Lokhmotov 3 | E: anton@dividiti.com 4 | H: https://www.hipeac.net/~anton 5 | O: dividiti, UK 6 | C: 7 | W: 8 | ======================================================================= 9 | N: Grigori Fursin 10 | E: grigori@dividiti.com 11 | H: http://fursin.net/research 12 | O: dividiti, UK / cTuning foundation, France 13 | C: 14 | W: 15 | -------------------------------------------------------------------------------- /docker/ck/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 7 | "run_extra_cmd": "--env CK_HOST=0.0.0.0 --env WFE_HOST=localhost --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#CK_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 8 | } 9 | }, 10 | "convert_input_to_vars": { 11 | "port": { 12 | "default": "3344", 13 | "key": "CK_PORT" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-16.04/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 7 | "run_extra_cmd": "--env CK_HOST=0.0.0.0 --env WFE_HOST=localhost --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#CK_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 8 | } 9 | }, 10 | "convert_input_to_vars": { 11 | "port": { 12 | "default": "3344", 13 | "key": "CK_PORT" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-17.04/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 7 | "run_extra_cmd": "--env CK_HOST=0.0.0.0 --env WFE_HOST=localhost --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#CK_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 8 | } 9 | }, 10 | "convert_input_to_vars": { 11 | "port": { 12 | "default": "3344", 13 | "key": "CK_PORT" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-18.04/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": { 3 | "default": { 4 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 5 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 6 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 7 | "run_extra_cmd": "--env CK_HOST=0.0.0.0 --env WFE_HOST=localhost --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#CK_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 8 | } 9 | }, 10 | "convert_input_to_vars": { 11 | "port": { 12 | "default": "3344", 13 | "key": "CK_PORT" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docker/ck/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "c2a48eabc0918fea", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-10T22:54:56.308490", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ck" 20 | } 21 | -------------------------------------------------------------------------------- /module/docker/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "88eef0cd8c43b68a", 3 | "backup_module_uid": "032630d041b4fd8a", 4 | "backup_module_uoa": "module", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-05-26T16:14:35.436000", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "docker" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-16.04/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "2ad0194934a99875", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-05-26T16:14:49.133000", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ubuntu-16.04" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-gcc/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "ab4db058845a3e02", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-09T12:49:00.164698", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ubuntu-16.04-crowdtune-gcc" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-web-server/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "0ae19441aabce562", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-11T15:59:59.319000", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ck-web-server" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-llvm/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "5b3ea2e4ebf8ba7f", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-11T18:43:14.712000", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ck-crowdtune-llvm" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-interactive-article/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "74b62bf7222a67bd", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-09T12:43:40.561942", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ubuntu-16.04-interactive-report" 20 | } 21 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-17.04/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "927a17ac3f00088a", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-11-10T14:29:50.295788", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "4", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "ck-ubuntu-17.04" 21 | } 22 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-18.04/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "9dd97f6d00c460cd", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2018-06-14T17:33:52.897051", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "4", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "ck-ubuntu-18.04" 21 | } 22 | -------------------------------------------------------------------------------- /docker/ck-interactive-article-cmd/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "7bd4d418efee6f25", 3 | "backup_module_uid": "88eef0cd8c43b68a", 4 | "backup_module_uoa": "docker", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2016-06-11T17:49:51.787000", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "7", 16 | "2dev" 17 | ] 18 | }, 19 | "data_name": "ck-interactive-article-cmd" 20 | } 21 | -------------------------------------------------------------------------------- /module/docker/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "build": { 4 | "desc": "build Docker image" 5 | }, 6 | "import": { 7 | "desc": "import external Docker image (tar file)" 8 | }, 9 | "login": { 10 | "desc": "login to Docker Hub" 11 | }, 12 | "push": { 13 | "desc": "push a given image to the Docker Hub" 14 | }, 15 | "run": { 16 | "desc": "run Docker image" 17 | }, 18 | "save": { 19 | "desc": "save Docker image (for example to share via external repositories and digital libraries)" 20 | } 21 | }, 22 | "actions_redirect": { 23 | "import": "ximport" 24 | }, 25 | "copyright": "See CK COPYRIGHT.txt for copyright details", 26 | "desc": "abstracting docker", 27 | "developer": "Grigori Fursin", 28 | "developer_email": "Grigori.Fursin@cTuning.org", 29 | "developer_webpage": "http://fursin.net", 30 | "license": "See CK LICENSE.txt for licensing details" 31 | } 32 | -------------------------------------------------------------------------------- /docker/ck/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | 26 | # Set the CK web service defaults. 27 | ENV CK_PORT=3344 \ 28 | WFE_PORT=3344 29 | 30 | # Expose CK port 31 | EXPOSE ${CK_PORT} 32 | 33 | # Start bash 34 | CMD bash 35 | -------------------------------------------------------------------------------- /docker/ck-web-server/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser": { 3 | "url": "http://$#WFE_HOST#$:$#WFE_PORT#$" 4 | }, 5 | "cmd": { 6 | "default": { 7 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 8 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 9 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 10 | "run_extra_cmd": "--env CK_HOST=$#CK_HOST#$ --env WFE_HOST=$#WFE_HOST#$ --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#WFE_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 11 | } 12 | }, 13 | "convert_input_to_vars": { 14 | "CK_HOST": { 15 | "default": "0.0.0.0", 16 | "key": "CK_HOST" 17 | }, 18 | "CK_PORT": { 19 | "default": "3344", 20 | "key": "CK_PORT" 21 | }, 22 | "WFE_HOST": { 23 | "default": "localhost", 24 | "key": "WFE_HOST" 25 | }, 26 | "WFE_PORT": { 27 | "default": "3344", 28 | "key": "WFE_PORT" 29 | } 30 | }, 31 | "platform_specific": { 32 | "windows": { 33 | "WFE_HOST": "$(docker-machine ip)" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docker/ck-interactive-article/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser": { 3 | "url": "http://$#WFE_HOST#$:$#WFE_PORT#$/web?wcid=1e348bd6ab43ce8a:b0779e2a64c22907" 4 | }, 5 | "cmd": { 6 | "default": { 7 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 8 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 9 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 10 | "run_extra_cmd": "--env CK_HOST=$#CK_HOST#$ --env WFE_HOST=$#WFE_HOST#$ --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#WFE_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 11 | } 12 | }, 13 | "convert_input_to_vars": { 14 | "CK_HOST": { 15 | "default": "0.0.0.0", 16 | "key": "CK_HOST" 17 | }, 18 | "CK_PORT": { 19 | "default": "3344", 20 | "key": "CK_PORT" 21 | }, 22 | "WFE_HOST": { 23 | "default": "localhost", 24 | "key": "WFE_HOST" 25 | }, 26 | "WFE_PORT": { 27 | "default": "3344", 28 | "key": "WFE_PORT" 29 | } 30 | }, 31 | "platform_specific": { 32 | "windows": { 33 | "WFE_HOST": "$(docker-machine ip)" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docker/ck-interactive-article-cmd/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser": { 3 | "url": "http://$#WFE_HOST#$:$#WFE_PORT#$/web?wcid=1e348bd6ab43ce8a:b0779e2a64c22907" 4 | }, 5 | "cmd": { 6 | "default": { 7 | "build": "-t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$ $#CK_PATH#$", 8 | "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 9 | "run": "--rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$", 10 | "run_extra_cmd": "--env CK_HOST=$#CK_HOST#$ --env WFE_HOST=$#WFE_HOST#$ --env CK_PORT=$#CK_PORT#$ --env WFE_PORT=$#WFE_PORT#$ -p $#CK_PORT#$:$#CK_PORT#$" 11 | } 12 | }, 13 | "convert_input_to_vars": { 14 | "CK_HOST": { 15 | "default": "0.0.0.0", 16 | "key": "CK_HOST" 17 | }, 18 | "CK_PORT": { 19 | "default": "3344", 20 | "key": "CK_PORT" 21 | }, 22 | "WFE_HOST": { 23 | "default": "localhost", 24 | "key": "WFE_HOST" 25 | }, 26 | "WFE_PORT": { 27 | "default": "3344", 28 | "key": "WFE_PORT" 29 | } 30 | }, 31 | "platform_specific": { 32 | "windows": { 33 | "WFE_HOST": "$(docker-machine ip)" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-llvm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Grigori Fursin 3 | 4 | # Install standard packages. 5 | RUN apt-get update && apt-get install -y \ 6 | python-all \ 7 | git bzip2 sudo wget zip 8 | 9 | # Install extra deps for imaging 10 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 11 | 12 | # Install LLVM to crowdtune 13 | RUN apt-get install -y clang 14 | 15 | # Install the core Collective Knowledge (CK) module. 16 | ENV CK_ROOT=/ck-master \ 17 | CK_REPOS=/CK \ 18 | CK_TOOLS=/CK-TOOLS \ 19 | PATH=${CK_ROOT}/bin:${PATH} 20 | 21 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 22 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 23 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 24 | 25 | # Install other CK modules. 26 | RUN ck pull repo:ck-web 27 | RUN ck pull repo:ck-crowdtuning 28 | 29 | # Start the CK web service. 30 | # Note, that container will have it's own IP, 31 | # that's why we need `hostname -i` below 32 | CMD ck crowdsource program.optimization --llvm --user=docker --quiet --skip_gpu_info --platform_init_uoa=generic-linux 33 | #CMD bash 34 | -------------------------------------------------------------------------------- /docker/ck-crowdtune-gcc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Grigori Fursin 3 | 4 | # Install standard packages. 5 | RUN apt-get update && apt-get install -y \ 6 | python-all \ 7 | git bzip2 sudo wget zip 8 | 9 | # Install extra deps for imaging 10 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 11 | 12 | # Install GCC to crowdtune 13 | RUN apt-get install -y gcc 14 | 15 | # Install the core Collective Knowledge (CK) module. 16 | ENV CK_ROOT=/ck-master \ 17 | CK_REPOS=/CK \ 18 | CK_TOOLS=/CK-TOOLS \ 19 | PATH=${CK_ROOT}/bin:${PATH} 20 | 21 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 22 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 23 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 24 | 25 | # Install other CK modules. 26 | RUN ck version 27 | RUN ck pull repo:ck-web 28 | RUN ck pull repo:ck-crowdtuning 29 | 30 | # Start the CK web service. 31 | # Note, that container will have it's own IP, 32 | # that's why we need `hostname -i` below 33 | CMD ck crowdsource program.optimization --gcc --user=docker --quiet --skip_gpu_info --platform_init_uoa=generic-linux 34 | #CMD bash 35 | -------------------------------------------------------------------------------- /docker/ck-web-server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | 26 | # Set the CK web service defaults. 27 | ENV CK_PORT=3344 \ 28 | WFE_PORT=3344 29 | 30 | # Expose CK port 31 | EXPOSE ${CK_PORT} 32 | 33 | # Start the CK web service. 34 | # Note, that container will have it's own IP, 35 | # that's why we need `hostname -i` below 36 | CMD export CK_LOCAL_HOST=`hostname -i` ; \ 37 | if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 38 | if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 39 | ck start web \ 40 | --host=${CK_HOST} --port=${CK_PORT} \ 41 | --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 42 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-16.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow build-essential 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | 26 | # Set the CK web service defaults. 27 | ENV CK_PORT=3344 \ 28 | WFE_PORT=3344 29 | 30 | # Expose CK port 31 | EXPOSE ${CK_PORT} 32 | 33 | # Start the CK web service. 34 | # Note, that container will have it's own IP, 35 | # that's why we need `hostname -i` below 36 | #CMD export CK_LOCAL_HOST=`hostname -i` ; \ 37 | # if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 38 | # if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 39 | # ck start web \ 40 | # --host=${CK_HOST} --port=${CK_PORT} \ 41 | # --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 42 | 43 | CMD bash 44 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-17.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:17.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow build-essential 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | 26 | # Set the CK web service defaults. 27 | ENV CK_PORT=3344 \ 28 | WFE_PORT=3344 29 | 30 | # Expose CK port 31 | EXPOSE ${CK_PORT} 32 | 33 | # Start the CK web service. 34 | # Note, that container will have it's own IP, 35 | # that's why we need `hostname -i` below 36 | #CMD export CK_LOCAL_HOST=`hostname -i` ; \ 37 | # if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 38 | # if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 39 | # ck start web \ 40 | # --host=${CK_HOST} --port=${CK_PORT} \ 41 | # --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 42 | 43 | CMD bash 44 | -------------------------------------------------------------------------------- /docker/ck-ubuntu-18.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow build-essential 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | 26 | # Set the CK web service defaults. 27 | #ENV CK_PORT=3344 \ 28 | # WFE_PORT=3344 29 | 30 | # Expose CK port 31 | #EXPOSE ${CK_PORT} 32 | 33 | # Start the CK web service. 34 | # Note, that container will have it's own IP, 35 | # that's why we need `hostname -i` below 36 | #CMD export CK_LOCAL_HOST=`hostname -i` ; \ 37 | # if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 38 | # if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 39 | # ck start web \ 40 | # --host=${CK_HOST} --port=${CK_PORT} \ 41 | # --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 42 | 43 | CMD bash 44 | -------------------------------------------------------------------------------- /docker/ck-interactive-article/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | RUN ck pull repo:reproduce-ck-paper 26 | RUN ck pull repo:reproduce-ck-paper-large-experiments 27 | RUN ck pull repo:reproduce-pamela-project 28 | 29 | # Set the CK web service defaults. 30 | ENV CK_PORT=3344 \ 31 | WFE_PORT=3344 32 | 33 | # Expose CK port 34 | EXPOSE ${CK_PORT} 35 | 36 | # Start the CK web service. 37 | # Note, that container will have it's own IP, 38 | # that's why we need `hostname -i` below 39 | CMD export CK_LOCAL_HOST=`hostname -i` ; \ 40 | if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 41 | if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 42 | ck start web \ 43 | --host=${CK_HOST} --port=${CK_PORT} \ 44 | --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) cTuning Foundation 2 | All rights reserved 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of Grigori Fursin and CTUNING FOUNDATION 15 | nor the names of its contributors may be used to endorse 16 | or promote products derived from this software without 17 | specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /docker/ck-interactive-article-cmd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Anton Lokhmotov 3 | MAINTAINER Grigori Fursin 4 | 5 | # Install standard packages. 6 | RUN apt-get update && apt-get install -y \ 7 | python-all \ 8 | git bzip2 sudo wget zip 9 | 10 | # Install extra deps for imaging 11 | RUN apt-get install -y libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pillow 12 | 13 | # Install the core Collective Knowledge (CK) module. 14 | ENV CK_ROOT=/ck-master \ 15 | CK_REPOS=/CK \ 16 | CK_TOOLS=/CK-TOOLS \ 17 | PATH=${CK_ROOT}/bin:${PATH} 18 | 19 | RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} 20 | RUN git clone https://github.com/ctuning/ck.git ${CK_ROOT} 21 | RUN cd ${CK_ROOT} && python setup.py install && python -c "import ck.kernel as ck" 22 | 23 | # Install other CK modules. 24 | RUN ck pull repo:ck-web 25 | RUN ck pull repo:reproduce-ck-paper 26 | RUN ck pull repo:reproduce-ck-paper-large-experiments 27 | RUN ck pull repo:reproduce-pamela-project 28 | 29 | # Set the CK web service defaults. 30 | ENV CK_PORT=3344 \ 31 | WFE_PORT=3344 32 | 33 | # Expose CK port 34 | EXPOSE ${CK_PORT} 35 | 36 | # Start the CK web service. 37 | # Note, that container will have it's own IP, 38 | # that's why we need `hostname -i` below 39 | #CMD export CK_LOCAL_HOST=`hostname -i` ; \ 40 | # if [ "${CK_HOST}" = "" ]; then export CK_HOST=$CK_LOCAL_HOST ; fi ; \ 41 | # if [ "${WFE_HOST}" = "" ]; then export WFE_HOST=$CK_LOCAL_HOST ; fi ; \ 42 | # ck start web \ 43 | # --host=${CK_HOST} --port=${CK_PORT} \ 44 | # --wfe_host=${WFE_HOST} --wfe_port=${WFE_PORT} 45 | 46 | CMD bash 47 | -------------------------------------------------------------------------------- /module/docker/.cm/updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": [ 3 | { 4 | "author": "cTuning foundation", 5 | "author_email": "admin@cTuning.org", 6 | "author_webpage": "http://cTuning.org", 7 | "copyright": "See CK COPYRIGHT.txt for copyright details", 8 | "engine": "CK", 9 | "iso_datetime": "2016-06-09T17:07:29.344156", 10 | "license": "See CK LICENSE.txt for licensing details", 11 | "version": [ 12 | "1", 13 | "7", 14 | "2dev" 15 | ] 16 | }, 17 | { 18 | "author": "cTuning foundation", 19 | "author_email": "admin@cTuning.org", 20 | "author_webpage": "http://cTuning.org", 21 | "copyright": "See CK COPYRIGHT.txt for copyright details", 22 | "engine": "CK", 23 | "iso_datetime": "2016-06-09T17:07:38.080206", 24 | "license": "See CK LICENSE.txt for licensing details", 25 | "version": [ 26 | "1", 27 | "7", 28 | "2dev" 29 | ] 30 | }, 31 | { 32 | "author": "Grigori Fursin", 33 | "author_email": "Grigori.Fursin@cTuning.org", 34 | "author_webpage": "http://fursin.net", 35 | "copyright": "See CK COPYRIGHT.txt for copyright details", 36 | "engine": "CK", 37 | "iso_datetime": "2016-06-11T15:55:24.833000", 38 | "license": "See CK LICENSE.txt for licensing details", 39 | "version": [ 40 | "1", 41 | "7", 42 | "2dev" 43 | ] 44 | }, 45 | { 46 | "author": "Grigori Fursin", 47 | "author_email": "Grigori.Fursin@cTuning.org", 48 | "author_webpage": "http://fursin.net", 49 | "copyright": "See CK COPYRIGHT.txt for copyright details", 50 | "engine": "CK", 51 | "iso_datetime": "2016-06-11T16:16:27.586000", 52 | "license": "See CK LICENSE.txt for licensing details", 53 | "version": [ 54 | "1", 55 | "7", 56 | "2dev" 57 | ] 58 | }, 59 | { 60 | "engine": "CK", 61 | "iso_datetime": "2018-05-30T14:36:44.120303", 62 | "version": [ 63 | "1", 64 | "9", 65 | "4", 66 | "1" 67 | ] 68 | }, 69 | { 70 | "engine": "CK", 71 | "iso_datetime": "2018-05-30T14:36:57.735934", 72 | "version": [ 73 | "1", 74 | "9", 75 | "4", 76 | "1" 77 | ] 78 | } 79 | ] 80 | } 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Automating creation and execution of Docker images via CK 2 | ========================================================= 3 | 4 | [![compatibility](https://github.com/ctuning/ck-guide-images/blob/master/ck-compatible.svg)](https://github.com/ctuning/ck) 5 | [![automation](https://github.com/ctuning/ck-guide-images/blob/master/ck-artifact-automated-and-reusable.svg)](http://cTuning.org/ae) 6 | 7 | [![DOI](https://zenodo.org/badge/59655164.svg)](https://zenodo.org/badge/latestdoi/59655164) 8 | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) 9 | 10 | This repository helps you automate various Docker tasks 11 | including "build", "run" and "push" via CK. Useful 12 | to build and deploy CK-powered Docker images 13 | for example to crowdsource autotuning and other experiments, 14 | or share your projects for [Artifact Evaluation](http://cTuning.org/ae) 15 | at conferences. You can find several such Docker images prepared 16 | via CK [here](https://hub.docker.com/u/ctuning). 17 | If you have questions and comments, feel free to get 18 | in touch with [the community](https://groups.google.com/forum/#!forum/collective-knowledge the community)! 19 | 20 | Status 21 | ====== 22 | Stable repository 23 | 24 | Prerequisites 25 | ============= 26 | 27 | ## Linux 28 | ### Install Docker 29 | 30 | To install Docker, please refer to the official 31 | [Docker installation instructions](https://docs.docker.com/engine/installation/). 32 | Please make sure that you can run the "hello-world" example: 33 | ``` 34 | $ docker run hello-world 35 | 36 | Hello from Docker. 37 | This message shows that your installation appears to be working correctly. 38 | ... 39 | ``` 40 | **NB:** To run Docker without `sudo` on Linux, create a `docker` user group 41 | (e.g. see instructions for Ubuntu [here](https://docs.docker.com/engine/installation/linux/ubuntulinux/#create-a-docker-group). 42 | 43 | ## Windows 44 | 45 | ### Install Oracle VirtualBox 46 | 47 | Download and install it from https://www.virtualbox.org/wiki/Downloads 48 | 49 | Note, that if you plan to use devices connected via USB 50 | (for example, access Android devices via ADB), you also need 51 | to install VirtualBox Extension Pack (you can download it from above page). 52 | 53 | ### Install Docker 54 | 55 | Follow these guidelines: 56 | * https://docs.docker.com/engine/installation/windows 57 | 58 | Note that if you plan to use USB devices, you need 59 | to update "default" VirtualBox image (created by Docker 60 | after installation) and enable USB (USB2 or USB3). 61 | 62 | ### Obtain Docker IP 63 | You can obtain internal IP of the docker machine 64 | (required for CK web services) using the following command: 65 | ``` 66 | $ docker-machine ip 67 | ``` 68 | 69 | Maintainers 70 | =========== 71 | * [dividiti](http://dividiti.com) 72 | 73 | Authors 74 | ======= 75 | 76 | * Anton Lokhmotov, dividiti (UK) 77 | * Grigori Fursin, cTuning foundation (France) 78 | 79 | License 80 | ======= 81 | * BSD, 3-clause 82 | 83 | Installation 84 | ============ 85 | ``` 86 | $ ck pull repo:ck-docker 87 | ``` 88 | 89 | Usage 90 | ===== 91 | 92 | ### List existing Docker images in the CK: 93 | 94 | ``` 95 | $ ck list docker 96 | ``` 97 | 98 | ### Run a given Docker image: 99 | 100 | ``` 101 | $ ck run docker:ck 102 | ``` 103 | 104 | This command will download Docker image with Ubuntu and CK installed, 105 | and will start an interactive bash session. 106 | 107 | If you need sudo to run docker on your machine, use flag '--sudo' as follows: 108 | ``` 109 | $ ck run docker:ck --sudo 110 | ``` 111 | 112 | If a given image was not shared with Docker Hub, 113 | you should build it locally. 114 | 115 | ### Build a given image locally 116 | 117 | ``` 118 | $ ck build docker:ck 119 | ``` 120 | 121 | If you need sudo to run docker, use flag '--sudo' as follows: 122 | ``` 123 | $ ck build docker:ck --sudo 124 | ``` 125 | 126 | If build succeeded, you can run this image via 127 | ``` 128 | $ ck run docker:ck 129 | ``` 130 | 131 | Examples 132 | ======== 133 | 134 | ## Use CK web server (JSON API) 135 | 136 | We have shared CK-based web server via Docker Hub. You can run it as follows: 137 | 138 | ``` 139 | $ ck run docker:ck-web-server 140 | 141 | Starting CK web service on 0.0.0.0:3344 (configured for access at 127.0.0.1:3344) ... 142 | ``` 143 | 144 | On Linux you should be able to access it via any browser as follows: 145 | ``` 146 | $ firefox http://localhost:3344 147 | 148 | ``` 149 | 150 | On Windows Docker will use a different IP such as 192.168.99.100 . 151 | In such case you should use it to browse CK repository, i.e. 152 | ``` 153 | $ firefox http://192.168.99.100:3344 154 | ``` 155 | 156 | Alternatively, you can ask CK to automatically detect this IP and start web server as follows: 157 | ``` 158 | $ ck run docker:ck-web-server --browser 159 | ``` 160 | 161 | If you plan to use it externally or in a workgroup, you will need to set 162 | external IP and port as follows: 163 | 164 | ``` 165 | $ export WFE_HOST=123.456.0.78 WFE_PORT=9999 CK_PORT=3344 166 | $ ck run docker:ck-ubuntu-16.04 --cmd=" -p ${WFE_PORT}:${CK_PORT} --env WFE_HOST=${WFE_HOST} --env WFE_PORT=${WFE_PORT} --env CK_PORT=${CK_PORT} --env CK_PORT=${CK_PORT}" 167 | 168 | Starting CK web service on 172.17.0.2:3344 (configured for access at 123.456.0.78:9999) ... 169 | ``` 170 | 171 | Note, that WFE_HOST is external IP and WFE_PORT is external port 172 | which CK web front end (dashboard) will use when preparing links 173 | in html pages. CK_HOST is internal host (can be left blank) 174 | and CK_PORT is internal port. 175 | 176 | Finally, if you do not have CK installed, you can run Docker image 177 | with the CK web server directly: 178 | ``` 179 | $ docker run --rm -p 3344:3344 ctuning/ck-web-server 180 | ``` 181 | 182 | and you can customize it as follows: 183 | ``` 184 | $ docker run --rm --env CK_HOST=0.0.0.0 --env WFE_HOST=localhost --env CK_PORT=3344 --env WFE_PORT=3344 -p 3344:3344 ctuning/ck-web-server 185 | ``` 186 | 187 | ## Browse interactive article and reproduce experiments 188 | 189 | We converted parts of our following papers and their results into CK-based interactive articles 190 | (to let the community reproduce our results and build upon them): 191 | * http://arxiv.org/abs/1506.06256 (CPC'15) 192 | * https://hal.inria.fr/hal-01054763 (JSP'14) 193 | * http://bit.ly/ck-date16 (DATE'16) 194 | * http://bit.ly/ck-multiprog16 (MULTIPROG'16) 195 | 196 | You can download related Docker image and browse it as follows: 197 | ``` 198 | $ ck run docker:ck-interactive-article --browser 199 | ``` 200 | 201 | Alternatively, you can run it manually via docker: 202 | ``` 203 | $ docker run --rm ctuning/ck-interactive-article 204 | $ firefox http://localhost:3344/web?wcid=1e348bd6ab43ce8a:b0779e2a64c22907 205 | ``` 206 | 207 | On Windows, you will need to change localhost to IP reported via 'docker-machine ip' 208 | as described in the previous sub-section. 209 | 210 | You can replay experiments from above papers (by copy/pasting replay CMD 211 | from the web dashboard) on your machine by running above Docker image 212 | in the interactive mode: 213 | 214 | ``` 215 | $ ck run docker:ck-interactive-article-cmd 216 | $ ck replay experiment ... 217 | ``` 218 | 219 | You can build this Docker image locally via 220 | 221 | ``` 222 | $ ck build docker:ck-interactive-article 223 | ``` 224 | 225 | If you need sudo to run docker, use flag '--sudo' as follows: 226 | ``` 227 | $ ck build docker:ck-interactive-article --sudo 228 | ``` 229 | 230 | ## Participate in GCC crowd-tuning 231 | 232 | You can participate in GCC crowd-tuning (i.e. collaboratively 233 | tuning optimization heuristic of GCC and sharing experimental results 234 | via public repository http://cknowledge.org/repo as follows: 235 | 236 | ``` 237 | $ ck run docker:ck-crowdtune-gcc 238 | 239 | or 240 | 241 | $ docker run ctuning/ck-crowdtune-gcc 242 | ``` 243 | 244 | However, we suggest to use CK natively. In such, case you will 245 | be able to take advantage of your latest environment and GCC compiler 246 | as follows: 247 | 248 | ``` 249 | $ ck pull repo:ck-crowdtuning 250 | $ ck crowdtune program --gcc 251 | ``` 252 | 253 | ## Participate in LLVM crowd-tuning 254 | 255 | Similar to GCC crowd-tuning you can collaboratively tune LLVM optimization 256 | heuristic on your machine via 257 | ``` 258 | $ ck run docker:ck-crowdtune-llvm 259 | 260 | or 261 | 262 | $ docker run ctuning/ck-crowdtune-llvm 263 | ``` 264 | 265 | ## Create your own CK-based Docker image 266 | 267 | Select the most close Docker image in CK and copy it to a new CK entry: 268 | 269 | ``` 270 | $ ck cp docker:ck-ubuntu-16.04-interactive-report :my-cool-image 271 | ``` 272 | 273 | Find its path: 274 | 275 | ``` 276 | $ ck find docker:my-cool-image 277 | ``` 278 | 279 | Edit Dockerfile and .cm/meta.json in this directory. 280 | 281 | When ready, build your image (and specify your own organization, 282 | to avoid using 'ctuning' as default) 283 | 284 | ``` 285 | $ ck build docker:my-cool-image --org=my-org 286 | ``` 287 | 288 | and then run it 289 | 290 | ``` 291 | $ ck run docker:my-cool-image 292 | ``` 293 | 294 | You can also login to the Docker Hub and push your image 295 | to your account via 296 | ``` 297 | $ ck login docker 298 | $ ck push docker:my-cool-image --org=my-org 299 | ``` 300 | 301 | That's all! 302 | 303 | Misc notes 304 | ========== 305 | 306 | If you want to access devices connected via USB from Docker image, 307 | you need to run Docker as follows: 308 | 309 | ``` 310 | $ docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb ... 311 | ``` 312 | 313 | Feedback 314 | ======== 315 | * https://groups.google.com/forum/#!forum/collective-knowledge 316 | -------------------------------------------------------------------------------- /module/docker/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Collective Knowledge (abstracting docker) 3 | # 4 | # See CK LICENSE.txt for licensing details 5 | # See CK COPYRIGHT.txt for copyright details 6 | # 7 | # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net 8 | # 9 | 10 | cfg={} # Will be updated by CK (meta description of this module) 11 | work={} # Will be updated by CK (temporal data) 12 | ck=None # Will be updated by CK (initialized CK kernel) 13 | 14 | # Local settings 15 | 16 | ############################################################################## 17 | # Initialize module 18 | 19 | def init(i): 20 | """ 21 | 22 | Input: {} 23 | 24 | Output: { 25 | return - return code = 0, if successful 26 | > 0, if error 27 | (error) - error text if return > 0 28 | } 29 | 30 | """ 31 | return {'return':0} 32 | 33 | ############################################################################## 34 | # build Docker image 35 | 36 | def build(i): 37 | """ 38 | Input: { 39 | data_uoa - CK entry with Docker description 40 | (scenario) - scenario to get CMD (default if empty) 41 | (org) - organization (default - ctuning) 42 | (cmd) - extra CMD 43 | } 44 | 45 | Output: { 46 | return - return code = 0, if successful 47 | > 0, if error 48 | (error) - error text if return > 0 49 | } 50 | 51 | """ 52 | 53 | i['func']='build' 54 | return call(i) 55 | 56 | ############################################################################## 57 | # run Docker image 58 | 59 | def run(i): 60 | """ 61 | Input: { 62 | data_uoa - CK entry with Docker description 63 | (scenario) - scenario to get CMD (default if empty) 64 | (cmd) - extra CMD 65 | } 66 | 67 | Output: { 68 | return - return code = 0, if successful 69 | > 0, if error 70 | (error) - error text if return > 0 71 | } 72 | 73 | """ 74 | 75 | i['func']='run' 76 | return call(i) 77 | 78 | ############################################################################## 79 | # run Docker image 80 | 81 | def call(i): 82 | """ 83 | Input: { 84 | data_uoa - CK entry with Docker description 85 | func - (build or run) 86 | 87 | (scenario) - scenario to get CMD (default if empty) 88 | (org) - organization (default - ctuning) 89 | 90 | (sudo) - if 'yes', use sudo 91 | 92 | (cmd) - extra CMD 93 | 94 | (browser) - if 'yes', start browser 95 | 96 | (filename) - file to save/load external Docker image (data_uoa.tar by default) 97 | } 98 | 99 | Output: { 100 | return - return code = 0, if successful 101 | > 0, if error 102 | (error) - error text if return > 0 103 | } 104 | 105 | """ 106 | 107 | import os 108 | import platform 109 | 110 | o=i.get('out','') 111 | 112 | func=i['func'] 113 | 114 | sudo=i.get('sudo','') 115 | 116 | duoa=i.get('data_uoa','') 117 | if duoa=='': 118 | return {'return':1, 'error':'please, specify CK entry with Docker description as following "ck build docker:{CK entry}"'} 119 | 120 | filename=i.get('filename','') 121 | if filename=='': filename='docker-image-'+duoa+'.tar' 122 | 123 | # Load CK entry 124 | r=ck.access({'action':'load', 125 | 'module_uoa':work['self_module_uid'], 126 | 'data_uoa':duoa}) 127 | if r['return']>0: return r 128 | 129 | p=r['path'] 130 | d=r['dict'] 131 | 132 | duoa=r['data_uoa'] 133 | duid=r['data_uid'] 134 | 135 | # Check if reuse other entry 136 | re=d.get('reuse_another_entry','') 137 | if re!='': 138 | r=ck.access({'action':'find', 139 | 'module_uoa':work['self_module_uid'], 140 | 'data_uoa':re}) 141 | if r['return']>0: return r 142 | p=r['path'] 143 | 144 | # Choose scenario 145 | s=i.get('scenario','') 146 | if s=='': s='default' 147 | 148 | # Choose organization 149 | org=i.get('org','') 150 | if org=='': 151 | org=ck.cfg.get('docker_org','') 152 | if org=='': 153 | org='ctuning' 154 | 155 | ecmd=i.get('cmd','') 156 | 157 | # Find scenario in meta 158 | cc=d.get('cmd',{}).get(s,{}) 159 | c=cc.get(func,'') 160 | if c=='': 161 | return {'return':1, 'error':'CMD to '+func+' Docker image is not defined in the CK entry ('+duoa+')'} 162 | 163 | # Check if Windows 164 | pl=platform.system().lower() 165 | ps=d.get('platform_specific',{}).get(pl,{}) 166 | for k in ps: 167 | v=ps[k] 168 | 169 | if v.startswith('$(') and v.endswith(')'): 170 | # Run and get var 171 | r=ck.gen_tmp_file({'prefix':'tmp-', 'suffix':'.tmp'}) 172 | if r['return']>0: return r 173 | ftmp=r['file_name'] 174 | 175 | os.system(v[2:-1]+' > '+ftmp) 176 | 177 | # Read file 178 | r=ck.load_text_file({'text_file':ftmp, 179 | 'delete_after_read':'yes'}) 180 | if r['return']>0: return r 181 | v=r['string'].strip() 182 | 183 | i[k]=v 184 | 185 | cmd=cc.get(func+'_extra_cmd','') 186 | if ecmd!='': 187 | cmd=ecmd 188 | 189 | # Update CMD 190 | c=c.replace('$#CK_DOCKER_ORGANIZATION#$',org) 191 | c=c.replace('$#CK_DOCKER_NAME#$',duoa) 192 | c=c.replace('$#CK_PATH#$',p) 193 | c=c.replace('$#CK_DOCKER_FILE#$',filename) 194 | 195 | if cmd!='': 196 | c=cmd+' '+c 197 | 198 | c='docker '+func+' '+c 199 | 200 | # Update vars from input 201 | citv=d.get('convert_input_to_vars',{}) 202 | for k in citv: 203 | x=citv[k] 204 | 205 | ki=x.get('key','') 206 | kd=x.get('default','') 207 | 208 | vv=i.get(k,'') 209 | if vv=='': 210 | vv=kd 211 | i[k]=vv 212 | 213 | c=c.replace('$#'+ki+'#$',vv) 214 | 215 | if sudo=='yes': 216 | c='sudo '+c 217 | 218 | # Check if has browser 219 | if i.get('browser','')=='yes': 220 | url=d.get('browser',{}).get('url','') 221 | 222 | # Update vars: 223 | for k in citv: 224 | x=citv[k] 225 | 226 | ki=x.get('key','') 227 | vv=i.get(k,'') 228 | 229 | url=url.replace('$#'+ki+'#$',vv) 230 | 231 | import webbrowser 232 | webbrowser.open(url) 233 | 234 | if o=='con': 235 | ck.out('Executing command line:') 236 | ck.out(' '+c) 237 | ck.out('') 238 | 239 | # Run Docker 240 | r=os.system(c) 241 | 242 | return {'return':0} 243 | 244 | ############################################################################## 245 | # login to Docker Hub 246 | 247 | def login(i): 248 | """ 249 | Input: { 250 | (sudo) - if 'yes', add sudo 251 | } 252 | 253 | Output: { 254 | return - return code = 0, if successful 255 | > 0, if error 256 | (error) - error text if return > 0 257 | } 258 | 259 | """ 260 | 261 | import os 262 | 263 | s='docker login' 264 | if i.get('sudo','')=='yes': 265 | s='sudo '+s 266 | 267 | os.system(s) 268 | 269 | return {'return':0} 270 | 271 | ############################################################################## 272 | # push a given image to the Docker Hub 273 | 274 | def push(i): 275 | """ 276 | Input: { 277 | data_uoa - CK entry with Docker description 278 | (scenario) - scenario to get CMD (default if empty) 279 | (org) - organization (default - ctuning) 280 | (cmd) - extra CMD 281 | } 282 | 283 | Output: { 284 | return - return code = 0, if successful 285 | > 0, if error 286 | (error) - error text if return > 0 287 | } 288 | 289 | """ 290 | 291 | i['func']='push' 292 | return call(i) 293 | 294 | ############################################################################## 295 | # save Docker image (for example to share via external repositories and digital libraries) 296 | 297 | def save(i): 298 | """ 299 | Input: { 300 | data_uoa - CK entry with Docker description 301 | (scenario) - scenario to get CMD (default if empty) 302 | (cmd) - extra CMD 303 | (filename) - file to save image (data_uoa.tar by default) 304 | } 305 | 306 | Output: { 307 | return - return code = 0, if successful 308 | > 0, if error 309 | (error) - error text if return > 0 310 | } 311 | 312 | """ 313 | 314 | i['func']='save' 315 | return call(i) 316 | 317 | ############################################################################## 318 | # import external Docker image (tar file) 319 | 320 | def ximport(i): 321 | """ 322 | Input: { 323 | data_uoa - CK entry with Docker description 324 | (scenario) - scenario to get CMD (default if empty) 325 | (cmd) - extra CMD 326 | (filename) - file to load image (data_uoa.tar by default) 327 | } 328 | 329 | Output: { 330 | return - return code = 0, if successful 331 | > 0, if error 332 | (error) - error text if return > 0 333 | } 334 | 335 | """ 336 | 337 | i['func']='import' 338 | return call(i) 339 | --------------------------------------------------------------------------------