Skip to content

Commit

Permalink
Use conda
Browse files Browse the repository at this point in the history
  • Loading branch information
Shotgunosine committed Jun 26, 2020
1 parent 5f593f5 commit 6d40956
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
54 changes: 40 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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 -'

Expand Down Expand Up @@ -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", \
Expand All @@ -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", \
Expand Down
2 changes: 1 addition & 1 deletion Singularity
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 2 additions & 4 deletions generate_freesurfer_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]' \
Expand Down Expand Up @@ -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 [email protected]' \
Expand Down

0 comments on commit 6d40956

Please sign in to comment.