diff --git a/Dockerfile b/Dockerfile index 039607c..f7c8b50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Generated by Neurodocker version 0.4.2-3-gf7055a1 -# Timestamp: 2020-06-25 20:45:40 UTC +# Timestamp: 2020-06-26 19:59:46 UTC # # Thank you for using Neurodocker. If you discover any issues # or ways to improve this software, please submit an issue or @@ -48,11 +48,6 @@ RUN apt-get update -qq \ perl-modules \ wget \ curl \ - python3 \ - python3-pip \ - python3-pandas \ - python-pip \ - python3-setuptools \ libsm-dev \ libx11-dev \ libxt-dev \ @@ -92,7 +87,31 @@ RUN apt-get update -qq \ --exclude='freesurfer/trctrain' \ && sed -i '$isource "/opt/freesurfer/SetUpFreeSurfer.sh"' "$ND_ENTRYPOINT" -RUN bash -c 'pip3 install nibabel pandas==0.21.0' +ENV CONDA_DIR="/opt/miniconda-latest" \ + PATH="/opt/miniconda-latest/bin:$PATH" +RUN export PATH="/opt/miniconda-latest/bin:$PATH" \ + && echo "Downloading Miniconda installer ..." \ + && conda_installer="/tmp/miniconda.sh" \ + && curl -fsSL --retry 5 -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ + && bash "$conda_installer" -b -p /opt/miniconda-latest \ + && rm -f "$conda_installer" \ + && conda update -yq -nbase conda \ + && conda config --system --prepend channels conda-forge \ + && conda config --system --set auto_update_conda false \ + && conda config --system --set show_channel_urls true \ + && sync && conda clean -tipsy && sync \ + && conda install -y -q --name base \ + 'python=3' \ + 'pip' \ + 'pandas' \ + 'setuptools' \ + 'pandas=0.21.0' \ + && sync && conda clean -tipsy && sync \ + && bash -c "source activate base \ + && pip install --no-cache-dir \ + 'nibabel'" \ + && rm -rf ~/.cache/pip/* \ + && sync RUN bash -c 'curl -sL https://deb.nodesource.com/setup_6.x | bash -' @@ -163,11 +182,6 @@ RUN echo '{ \ \n "perl-modules", \ \n "wget", \ \n "curl", \ - \n "python3", \ - \n "python3-pip", \ - \n "python3-pandas", \ - \n "python-pip", \ - \n "python3-setuptools", \ \n "libsm-dev", \ \n "libx11-dev", \ \n "libxt-dev", \ @@ -183,8 +197,20 @@ RUN echo '{ \ \n } \ \n ], \ \n [ \ - \n "run_bash", \ - \n "pip3 install nibabel pandas==0.21.0" \ + \n "miniconda", \ + \n { \ + \n "use_env": "base", \ + \n "conda_install": [ \ + \n "python=3", \ + \n "pip", \ + \n "pandas", \ + \n "setuptools", \ + \n "pandas=0.21.0" \ + \n ], \ + \n "pip_install": [ \ + \n "nibabel" \ + \n ] \ + \n } \ \n ], \ \n [ \ \n "run_bash", \ diff --git a/Singularity b/Singularity index 0ee8ebf..84b216c 100644 --- a/Singularity +++ b/Singularity @@ -1,5 +1,5 @@ # Generated by Neurodocker version 0.4.2-3-gf7055a1 -# Timestamp: 2020-06-25 20:45:41 UTC +# Timestamp: 2020-06-26 19:59:47 UTC # # Thank you for using Neurodocker. If you discover any issues # or ways to improve this software, please submit an issue or diff --git a/generate_freesurfer_images.sh b/generate_freesurfer_images.sh index 575bd67..4f55b40 100644 --- a/generate_freesurfer_images.sh +++ b/generate_freesurfer_images.sh @@ -46,10 +46,9 @@ docker run --rm ${image} generate docker \ --base ubuntu:xenial \ --pkg-manager apt \ --install tcsh bc tar libgomp1 perl-modules wget curl \ - python3 python3-pip python3-pandas python-pip python3-setuptools \ libsm-dev libx11-dev libxt-dev libxext-dev libglu1-mesa \ --freesurfer version=6.0.1 install_path=/opt/freesurfer \ - --run-bash 'pip3 install nibabel pandas==0.21.0' \ + --miniconda use_env=base conda_install="python=3 pip pandas setuptools pandas=0.21.0" pip_install="nibabel" \ --run-bash 'curl -sL https://deb.nodesource.com/setup_6.x | bash -' \ --install nodejs \ --run-bash 'npm install -g bids-validator@0.19.8' \ @@ -80,10 +79,9 @@ docker run --rm ${image} generate singularity \ --base ubuntu:xenial \ --pkg-manager apt \ --install tcsh bc tar libgomp1 perl-modules wget curl \ - python3 python3-pip python3-pandas python-pip python3-setuptools \ libsm-dev libx11-dev libxt-dev libxext-dev libglu1-mesa \ --freesurfer version=6.0.1 install_path=/opt/freesurfer \ - --run-bash 'pip3 install nibabel pandas==0.21.0' \ + --miniconda use_env=base conda_install="python=3 pip pandas setuptools pandas=0.21.0" pip_install="nibabel" \ --run-bash 'curl -sL https://deb.nodesource.com/setup_6.x | bash -' \ --install nodejs \ --run-bash 'npm install -g bids-validator@0.19.8' \