From ab670c0ce245e86f90d5584aa30ca8d13f846d80 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Wed, 13 Mar 2019 14:26:35 +0100 Subject: [PATCH] Move crYOLO paths to config file --- EM/crYOLO/build | 47 ++++++++++++++++++--------------- EM/crYOLO/files/config-1.2.3.sh | 10 +++++++ 2 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 EM/crYOLO/files/config-1.2.3.sh diff --git a/EM/crYOLO/build b/EM/crYOLO/build index 70072a6..cc36cb6 100755 --- a/EM/crYOLO/build +++ b/EM/crYOLO/build @@ -1,40 +1,43 @@ #!/usr/bin/env modbuild + pbuild::add_to_group 'EM' pbuild::prep() { - echo "prepping" - mkdir -p "$SRC_DIR" - curl -fsSLo "$SRC_DIR/miniconda.sh" 'https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh' - curl -fsSLo "$SRC_DIR/cryoloBM.tgz" 'ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_BM_V1_1_1/cryoloBM-1.1.1.tar.gz' - curl -fsSLo "$SRC_DIR/cryolo.tgz" 'ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_V1_2_3/cryolo-1.2.3.tar.gz' - : + + source "${BUILDBLOCK_DIR}/files/config-$V.sh" + + echo "prepping" + mkdir -p "$SRC_DIR" + curl -fsSLo "$SRC_DIR/miniconda.sh" "https://repo.anaconda.com/miniconda/${MINICONDA_VERSION:-Miniconda2-latest-Linux-x86_64.sh}" + curl -fsSLo "$SRC_DIR/cryoloBM.tgz" "${CRYOLOBM_URL:-ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_BM_V1_1_1/cryoloBM-1.1.1.tar.gz}" + curl -fsSLo "$SRC_DIR/cryolo.tgz" "${CRYOLO_URL:-ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_V${V_MAJOR}_${V_MINOR}_${V_PATCH}/cryolo-${V}.tar.gz}" } pbuild::configure() { - : + : } pbuild::compile() { - : + : } pbuild::install() { - mkdir -p $PREFIX + mkdir -p $PREFIX - # Install conda - bash "$SRC_DIR/miniconda.sh" -b -p $PREFIX/conda + # Install conda + bash "$SRC_DIR/miniconda.sh" -b -p $PREFIX/conda - # Create environment - $PREFIX/conda/bin/conda create -y --name crYOLO anaconda python=3.6 pyqt=5 cudnn=7.1.2 numpy - - # Activate - source $PREFIX/conda/bin/activate crYOLO - - # Install - pip install $SRC_DIR/cryolo.tgz - pip install $SRC_DIR/cryoloBM.tgz + # Create environment + $PREFIX/conda/bin/conda create -y --name crYOLO anaconda python=3.6 pyqt=5 cudnn=7.1.2 numpy - # Deactivate - source deactivate + # Activate + source $PREFIX/conda/bin/activate crYOLO + + # Install + pip install $SRC_DIR/cryolo.tgz + pip install $SRC_DIR/cryoloBM.tgz + + # Deactivate + source deactivate } diff --git a/EM/crYOLO/files/config-1.2.3.sh b/EM/crYOLO/files/config-1.2.3.sh new file mode 100644 index 0000000..319d977 --- /dev/null +++ b/EM/crYOLO/files/config-1.2.3.sh @@ -0,0 +1,10 @@ +# crYOLO configuration variables + +# Miniconda installer filename. Defaults to 'latest' +MINICONDA_VERSION='Miniconda2-4.5.12-Linux-x86_64.sh' + +# cryoloBM download url +CRYOLOBM_URL='ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_BM_V1_1_1/cryoloBM-1.1.1.tar.gz' +# cryolo download url. Default: +#CRYOLO_URL='ftp://ftp.gwdg.de/pub/misc/sphire/crYOLO_V1_2_3/cryolo-1.2.3.tar.gz' +