コード例 #1
0
ファイル: test_fsl.py プロジェクト: schahid/neurodocker
 def test_build_image_fsl_509_binaries_stretch(self):
     """Install FSL binaries on Debian Stretch."""
     specs = {'pkg_manager': 'apt',
              'check_urls': True,
              'instructions': [
                 ('base', 'debian:stretch'),
                 ('fsl', {'version': '5.0.9', 'use_binaries': True})
              ]}
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('bash -c "bet"')
     assert "error" not in output, "error running bet"
     utils.test_cleanup(container)
コード例 #2
0
ファイル: test_fsl.py プロジェクト: schahid/neurodocker
 def test_build_image_fsl_latest_pyinstaller_centos7(self):
     """Install latest FSL with FSL's Python installer on CentOS 7."""
     specs = {'pkg_manager': 'yum',
              'check_urls': True,
              'instructions': [
                 ('base', 'centos:7'),
                 ('fsl', {'version': '5.0.10', 'use_binaries': True}),
                 ('user', 'neuro'),
              ]}
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('bash -c "bet"')
     assert "error" not in output, "error running bet"
     utils.test_cleanup(container)
コード例 #3
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'),
         ]
     }
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('mrinfo')
     assert "error" not in output, "error running mrinfo"
     utils.test_cleanup(container)
コード例 #4
0
ファイル: test_ants.py プロジェクト: schahid/neurodocker
 def test_build_image_ants_210_binaries_centos7(self):
     """Install ANTs 2.1.0 binaries on CentOS 7."""
     specs = {
         'pkg_manager':
         'yum',
         'check_urls':
         True,
         'instructions': [
             ('base', 'centos:7'),
             ('ants', {
                 'version': '2.2.0',
                 'use_binaries': True
             }),
             ('user', 'neuro'),
         ]
     }
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('Atropos')
     assert "error" not in output, "error running Atropos"
     utils.test_cleanup(container)
コード例 #5
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'),
         ]
     }
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('bash -c "recon-all"')
     assert "error" not in output, "error running recon-all"
     utils.test_cleanup(container)
コード例 #6
0
ファイル: test_afni.py プロジェクト: schahid/neurodocker
    def test_build_image_afni_latest_binaries_stretch(self):
        """Install latest AFNI binaries on Debian stretch."""
        specs = {
            'pkg_manager':
            'apt',
            'check_urls':
            True,
            'instructions': [
                ('base', 'debian:stretch'),
                ('afni', {
                    'version': 'latest',
                    'use_binaries': True
                }),
                ('user', 'neuro'),
            ]
        }

        container = utils.get_container_from_specs(specs)
        output = container.exec_run('3dSkullStrip')
        assert "error" not in output, "error running 3dSkullStrip"
        utils.test_cleanup(container)
コード例 #7
0
ファイル: test_spm.py プロジェクト: schahid/neurodocker
    def test_build_image_spm_12_standalone_stretch(self):
        """Install standalone SPM12 and MATLAB MCR R2017a."""
        specs = {'pkg_manager': 'apt',
                 'check_urls': True,
                 'instructions': [
                    ('base', 'debian:stretch'),
                    ('spm', {'version': '12', 'matlab_version': 'R2017a'}),
                    ('user', 'neuro'),
                 ]}
        container = utils.get_container_from_specs(specs)

        cmd = ["/bin/bash", "-c", """echo 'fprintf("desired output")' > /tmp/test.m """]
        container.exec_run(cmd)
        # QUESTION: how can we run the entrypoint on a container in the
        # background? The cmd below is a workaround because the entrypoint is
        # not being run, so SPMMCRCMD is not set.
        cmd = ["/bin/bash", "-c",
               'source /neurodocker/startup.sh true && $SPMMCRCMD /tmp/test.m']
        output = container.exec_run(cmd)
        assert "error" not in output.lower(), "error running SPM command"
        assert "desired output" in output, "expected output not found"
        utils.test_cleanup(container)
コード例 #8
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'),
              ]}
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('python -V')
     assert "3.5.1" in output, "incorrect Python version"
     output = container.exec_run('python -c "import nipype"')
     assert "ImportError" not in output, "nipype not installed"
     utils.test_cleanup(container)
コード例 #9
0
 def test_build_image_neurodebian_dcm2niix_xenial(self):
     """Install latest version of Miniconda via ContinuumIO's installer
     script on Ubuntu Xenial.
     """
     specs = {
         'pkg_manager':
         'apt',
         'check_urls':
         False,
         'instructions': [
             ('base', 'debian:stretch'),
             ('neurodebian', {
                 'os_codename': 'stretch',
                 'download_server': 'usa-nh',
                 'full': True,
                 'pkgs': ['dcm2niix']
             }),
             ('user', 'neuro'),
         ]
     }
     container = utils.get_container_from_specs(specs)
     output = container.exec_run('dcm2niix -h')
     assert "usage: dcm2niix" in output, "dcm2niix not working"
     utils.test_cleanup(container)