diff --git a/Dockerfile b/Dockerfile index da0cf4c..7fe355f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,30 +124,31 @@ RUN export PATH="$HOME/miniconda-latest/bin:$PATH" \ #### install RABIES - -RUN git clone https://github.com/CoBrALab/RABIES temp/RABIES && \ - conda env create -f temp/RABIES/rabies_environment.yml && \ - bash temp/RABIES/install.sh && \ - rm -r temp - -# create WM and CSF masks -ENV DSURQE_100micron_anat=/home/rabies/RABIES/template_files/DSURQE_100micron_average.nii.gz \ - DSURQE_100micron_mask=/home/rabies/RABIES/template_files/DSURQE_100micron_mask.nii.gz \ - DSURQE_100micron_labels=/home/rabies/RABIES/template_files/DSURQE_100micron_labels.nii.gz \ - csv_labels=/home/rabies/RABIES/template_files/DSURQE_40micron_R_mapping.csv - -RUN /home/rabies/miniconda-latest/envs/rabies/bin/python /home/rabies/RABIES/gen_masks.py $DSURQE_100micron_labels $csv_labels /home/rabies/RABIES/template_files/DSURQE_100micron - - -#write container execution script -RUN echo "#! /home/rabies/miniconda-latest/envs/rabies/bin/python" > /home/rabies/RABIES/exec.py && \ - echo "import os" >> /home/rabies/RABIES/exec.py && \ - echo "import sys" >> /home/rabies/RABIES/exec.py && \ - echo "os.environ['RABIES'] = '/home/rabies/RABIES'" >> /home/rabies/RABIES/exec.py && \ - echo "sys.path.insert(0,os.environ['RABIES'])" >> /home/rabies/RABIES/exec.py && \ - echo "from rabies.run_main import execute_workflow" >> /home/rabies/RABIES/exec.py && \ - echo "execute_workflow()" >> /home/rabies/RABIES/exec.py && \ - chmod +x /home/rabies/RABIES/exec.py +ENV export RABIES_VERSION=0.1.1 \ + export RABIES=$HOME/RABIES-${RABIES_VERSION} \ + export PYTHONPATH="${PYTHONPATH}:$RABIES" + +RUN export RABIES_VERSION=0.1.1 && \ + export RABIES=$HOME/RABIES-${RABIES_VERSION} && \ + mkdir -p temp && \ + curl -L --retry 5 -o temp/RABIES.tar.gz https://github.com/CoBrALab/RABIES/archive/${RABIES_VERSION}.tar.gz && \ + cd temp && \ + tar zxf RABIES.tar.gz && \ + cd .. && \ + conda env create -f temp/RABIES-${RABIES_VERSION}/rabies_environment.yml && \ + bash temp/RABIES-${RABIES_VERSION}/install.sh && \ + rm -r temp && \ + DSURQE_100micron_labels=${RABIES}/template_files/DSURQE_100micron_labels.nii.gz && \ + csv_labels=${RABIES}/template_files/DSURQE_40micron_R_mapping.csv && \ + /home/rabies/miniconda-latest/envs/rabies/bin/python ${RABIES}/gen_masks.py $DSURQE_100micron_labels $csv_labels ${RABIES}/template_files/DSURQE_100micron && \ + echo "#! /home/rabies/miniconda-latest/envs/rabies/bin/python" > ${RABIES}/exec.py && \ + echo "import os" >> ${RABIES}/exec.py && \ + echo "import sys" >> ${RABIES}/exec.py && \ + echo "os.environ['RABIES'] = '${RABIES}'" >> ${RABIES}/exec.py && \ + echo "sys.path.insert(0,os.environ['RABIES'])" >> ${RABIES}/exec.py && \ + echo "from rabies.run_main import execute_workflow" >> ${RABIES}/exec.py && \ + echo "execute_workflow()" >> ${RABIES}/exec.py && \ + chmod +x ${RABIES}/exec.py ENV QBATCH_SYSTEM local diff --git a/install.sh b/install.sh index 4306089..7a99fa4 100644 --- a/install.sh +++ b/install.sh @@ -1,16 +1,22 @@ ### setup RABIES execution and DSURQE atlas #will install RABIES in HOME directory -export RABIES=$HOME/RABIES +export RABIES_VERSION=0.1.1 +export RABIES=$HOME/RABIES-${RABIES_VERSION} export PYTHONPATH="${PYTHONPATH}:$RABIES" -git clone https://github.com/CoBrALab/RABIES $HOME/RABIES +#cd $HOME +#curl -L --retry 5 -o $HOME/RABIES.tar.gz https://github.com/CoBrALab/RABIES/archive/${RABIES_VERSION}.tar.gz +#tar zxf $HOME/RABIES.tar.gz +#rm $HOME/RABIES.tar.gz +git clone https://github.com/CoBrALab/RABIES $RABIES #creates an executable script to execute rabies mkdir -p $RABIES/bin echo -e '#! /usr/bin/env python \nfrom rabies.run_main import execute_workflow \nexecute_workflow()' > $RABIES/bin/rabies chmod +x $RABIES/bin/rabies echo "# added by RABIES" >> $HOME/.bashrc +echo "export RABIES_VERSION=0.1.1" >> $HOME/.bashrc echo "export RABIES=$RABIES" >> $HOME/.bashrc echo 'export PYTHONPATH="${PYTHONPATH}:$RABIES"' >> $HOME/.bashrc echo 'export PATH=$PATH:$RABIES/bin' >> $HOME/.bashrc diff --git a/rabies_environment.yml b/rabies_environment.yml index 7054e94..edf76e1 100644 --- a/rabies_environment.yml +++ b/rabies_environment.yml @@ -1,34 +1,18 @@ name: rabies channels: - - simpleitk - defaults - conda-forge + - bioconda + - simpleitk dependencies: - - blas=2.11=openblas - - keepalive=0.5=py_1 - - libblas=3.8.0=11_openblas - - libcblas=3.8.0=11_openblas - - liblapack=3.8.0=11_openblas - - liblapacke=3.8.0=11_openblas - - multiprocess=0.70.8=py36h516909a_1 - - nibabel=2.3.1=pyh24bf2e0_0 - - nilearn=0.4.2=pyh24bf2e0_0 - - nipype=1.1.4=py36_0 - - pathos=0.2.4=py_0 - - pox=0.2.6=py_0 - - ppft=1.6.6.1=py36_0 - - prov=1.5.0=py36_0 - - pydicom=1.3.0=py_0 - - rdflib=4.2.2=py36_1000 - - sparqlwrapper=1.8.2=py36_1000 - - xvfbwrapper=0.2.9=py36_1000 - _libgcc_mutex=0.1=main - apipkg=1.5=py36_0 - atomicwrites=1.3.0=py36_1 - attrs=19.1.0=py36_1 - - ca-certificates=2019.5.15=1 + - blas=2.11=openblas + - ca-certificates=2019.10.16=0 - cairo=1.14.12=h8948797_3 - - certifi=2019.6.16=py36_1 + - certifi=2019.9.11=py36_0 - click=7.0=py36_0 - cloudpickle=1.2.2=py_0 - cycler=0.10.0=py36_0 @@ -59,11 +43,16 @@ dependencies: - importlib_metadata=0.19=py36_0 - isodate=0.6.0=py_1 - jpeg=9b=h024ee3a_2 + - keepalive=0.5=py_1 - kiwisolver=1.1.0=py36he6710b0_0 + - libblas=3.8.0=11_openblas + - libcblas=3.8.0=11_openblas - libedit=3.1.20181209=hc058e9b_0 - libffi=3.2.1=hd88cf55_4 - libgcc-ng=9.1.0=hdf63c60_0 - libgfortran-ng=7.3.0=hdf63c60_0 + - liblapack=3.8.0=11_openblas + - liblapacke=3.8.0=11_openblas - libopenblas=0.3.6=h5a2b251_1 - libpng=1.6.37=hbc83047_0 - libstdcxx-ng=9.1.0=hdf63c60_0 @@ -76,22 +65,31 @@ dependencies: - matplotlib=3.1.1=py36h5429711_0 - mock=3.0.5=py36_0 - more-itertools=7.2.0=py36_0 + - multiprocess=0.70.8=py36h516909a_1 - ncurses=6.1=he6710b0_1 - networkx=2.3=py_0 + - nibabel=2.3.1=pyh24bf2e0_0 + - nilearn=0.5.2=pyh24bf2e0_0 + - nipype=1.1.4=py36_0 - numpy=1.16.2=py36h99e49ec_0 - numpy-base=1.16.2=py36h2f8d375_0 - olefile=0.46=py36_0 - - openssl=1.1.1d=h7b6447c_1 + - openssl=1.1.1d=h7b6447c_3 - packaging=19.1=py36_0 - pandas=0.25.1=py36he6710b0_0 - pango=1.42.4=h049681c_0 + - pathos=0.2.4=py_0 - pcre=8.43=he6710b0_0 - pillow=6.1.0=py36h34e0f95_0 - pip=19.2.2=py36_0 - pixman=0.38.0=h7b6447c_0 - pluggy=0.12.0=py_0 + - pox=0.2.6=py_0 + - ppft=1.6.6.1=py36_0 + - prov=1.5.0=py36_0 - psutil=5.6.3=py36h7b6447c_0 - py=1.8.0=py36_0 + - pydicom=1.3.0=py_0 - pydotplus=2.0.2=py36_1 - pyparsing=2.4.2=py_0 - pyqt=5.9.2=py36h05f1152_2 @@ -104,14 +102,17 @@ dependencies: - pytz=2019.2=py_0 - pywavelets=1.0.3=py36hdd07704_1 - qt=5.9.7=h5867ecd_1 + - rdflib=4.2.2=py36_1000 - readline=7.0=h7b6447c_5 - scikit-image=0.15.0=py36he6710b0_0 - scikit-learn=0.20.0=py36h22eb022_1 - scipy=1.3.1=py36he2b7bc3_0 - setuptools=41.0.1=py36_0 + - simpleitk=1.2.2=py36hf484d3e_0 - simplejson=3.16.0=py36h14c3975_0 - sip=4.19.8=py36hf484d3e_0 - six=1.12.0=py36_0 + - sparqlwrapper=1.8.2=py36_1000 - sqlite=3.29.0=h7b6447c_0 - tk=8.6.8=hbc83047_0 - toolz=0.10.0=py_0 @@ -121,17 +122,15 @@ dependencies: - wcwidth=0.1.7=py36_0 - webencodings=0.5.1=py36_1 - wheel=0.33.4=py36_0 + - xvfbwrapper=0.2.9=py36_1000 - xz=5.2.4=h14c3975_4 - zipp=0.5.2=py_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.3.7=h0b5b093_0 - - simpleitk=1.2.2=py36hf484d3e_0 - pip: - bids-validator==1.2.4 - - dask==2.3.0 - docopt==0.6.2 - num2words==0.5.10 - patsy==0.5.1 - - pybids==0.9.4 + - pybids==0.9.5 - sqlalchemy==1.3.10 -