Exemplo n.º 1
0
    def test_build_image_miniconda_latest_shellscript_centos7(self):
        """Install latest version of Miniconda via ContinuumIO's installer
        script on CentOS 7.
        """
        specs = {'pkg_manager': 'yum',
                 'check_urls': True,
                 'instructions': [
                    ('base', 'centos:7'),
                    ('user', 'neuro'),
                    ('miniconda', {
                        'env_name': 'default',
                        'python_version': '3.5.1',
                        'conda_install': ['traits'],
                        'pip_install': ['https://github.com/nipy/nipype/archive/master.tar.gz']
                    }),
                    ('user', 'neuro'),
                 ]}

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING['miniconda_centos7']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "python -V"
        assert DockerContainer(image).run(cmd) == b'Python 3.5.1\n'

        cmd = "bash /testscripts/test_miniconda.sh"
        DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 2
0
    def test_build_image_petpvc_120b_binaries_xenial(self):
        """Install PETPVC binaries on Ubuntu Xenial."""
        specs = {
            'pkg_manager':
            'apt',
            'check_urls':
            True,
            'instructions': [
                ('base', 'ubuntu:xenial'),
                ('petpvc', {
                    'version': '1.2.0-b',
                    'use_binaries': True
                }),
                ('user', 'neuro'),
            ]
        }
        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING['petpvc_xenial']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_petpvc.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 3
0
    def test_build_image_fsl_5010_binaries_centos7(self):
        """Install FSL binaries on CentOS 7."""
        specs = {
            'pkg_manager':
            'yum',
            'check_urls':
            True,
            'instructions': [('base', 'centos:7'),
                             ('fsl', {
                                 'version': '5.0.10',
                                 'use_binaries': True,
                                 'eddy_5011': True
                             })]
        }

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'fsl-5.0.10_centos7']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_fsl.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 4
0
    def test_build_image_dcm2niix_master_source_centos7(self):
        """Install dcm2niix from source on CentOS 7."""
        specs = {
            'pkg_manager':
            'yum',
            'check_urls':
            True,
            'instructions': [
                ('base', 'centos:7'),
                ('dcm2niix', {
                    'version': 'master'
                }),
                ('user', 'neuro'),
            ]
        }

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'dcm2niix-master_centos7']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_dcm2niix.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 5
0
    def test_build_image_mrtrix3_binaries_centos7(self):
        """Install MRtrix3 binaries on CentOS 7."""
        specs = {
            'pkg_manager':
            'yum',
            'check_urls':
            True,
            'instructions': [
                ('base', 'centos:7'),
                ('mrtrix3', {
                    'use_binaries': True
                }),
                ('user', 'neuro'),
            ]
        }

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'mrtrix3_centos7']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_mrtrix.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
    def test_build_image_convert3d_100_binaries_zesty(self):
        """Install Convert3D binaries on Ubuntu Zesty."""
        specs = {
            'pkg_manager':
            'apt',
            'check_urls':
            True,
            'instructions': [
                ('base', 'ubuntu:zesty'),
                ('c3d', {
                    'version': '1.0.0'
                }),
                ('user', 'neuro'),
            ]
        }
        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'convert3d_zesty']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_convert3d.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 7
0
    def test_build_image_afni_latest_binaries_stretch(self):
        """Install latest AFNI binaries on Debian stretch."""
        specs = {
            'pkg_manager':
            'apt',
            'check_urls':
            False,
            'instructions': [
                ('base', 'debian:stretch'),
                ('afni', {
                    'version': 'latest',
                    'use_binaries': True
                }),
                ('user', 'neuro'),
            ]
        }

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'afni-latest_stretch']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_afni.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 8
0
    def test_build_image_freesurfer_600_min_binaries_xenial(self):
        """Install minimized FreeSurfer binaries on Ubuntu Xenial."""
        specs = {
            'pkg_manager':
            'apt',
            'check_urls':
            True,
            'instructions': [
                ('base', 'ubuntu:xenial'),
                ('freesurfer', {
                    'version': '6.0.0',
                    'use_binaries': True,
                    'min': True
                }),
                ('user', 'neuro'),
            ]
        }
        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING[
            'freesurfer-min_zesty']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_freesurfer.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 9
0
    def test_build_image_spm_12_standalone_zesty(self):
        """Install standalone SPM12 and MATLAB MCR R2017a."""
        specs = {'pkg_manager': 'apt',
                 'check_urls': True,
                 'instructions': [
                    ('base', 'ubuntu:zesty'),
                    ('spm', {'version': '12', 'matlab_version': 'R2017a'}),
                    ('user', 'neuro'),
                 ]}

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING['spm-12_zesty']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_spm.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)
Exemplo n.º 10
0
    def test_build_image_neurodebian_dcm2niix_xenial(self):
        """Install NeuroDebian on Ubuntu 16.04."""
        specs = {'pkg_manager': 'apt',
                 'check_urls': False,
                 'instructions': [
                    ('base', 'ubuntu:16.04'),
                    ('neurodebian', {'os_codename': 'stretch',
                                    'download_server': 'usa-nh',
                                    'full': True,
                                    'pkgs': ['dcm2niix']}),
                    ('user', 'neuro'),
                ]}

        df = Dockerfile(specs).cmd
        dbx_path, image_name = utils.DROPBOX_DOCKERHUB_MAPPING['neurodebian_stretch']
        image, push = utils.get_image_from_memory(df, dbx_path, image_name)

        cmd = "bash /testscripts/test_neurodebian.sh"
        assert DockerContainer(image).run(cmd, volumes=utils.volumes)

        if push:
            utils.push_image(image_name)