From bb877fc5073c153a6db3cf7c31697b55eff53657 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 13:51:44 +0100 Subject: [PATCH 01/13] tensorflow build from source --- python-3.7.6-0.build.sh | 63 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) mode change 100644 => 100755 python-3.7.6-0.build.sh diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh old mode 100644 new mode 100755 index 186ee89..6532b49 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -217,7 +217,6 @@ pip3 install --prefix=$PREFIX louvain # monocle3 prep for Helene pip3 install --prefix=$PREFIX selenium # 19.7.19 Kreitler -> https://webxray.org/ pip3 install --prefix=$PREFIX cooltools # Maria Valieva 17.7.2019 pip3 install --prefix=$PREFIX gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) -pip3 install --prefix=$PREFIX tensorflow==2.0.1 # tensorflow-2.1.0 needs spezial libs and nightly version(2.2.0) dont pip3 install --prefix=$PREFIX torch pip3 install --prefix=$PREFIX torchvision pip3 install --prefix=$PREFIX plotly @@ -324,6 +323,68 @@ pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mar python3 setup.py install --prefix $PREFIX ) + +#tensorflow +( + TFVERSION=2.1.0 + TFSRC=https://github.com/tensorflow/tensorflow/archive/v${TFVERSION}/tensorflow-${TFVERSION}.tar.gz + + + . ${PREFIX}/profile + . /pkg/bazel-0.28.1-0/profile + cd $BUILDDIR + test -e tensorflow-${TFVERSION}.tar.gz || wget $TFSRC + test -d tensorflow-${TFVERSION} || tar -xf tensorflow-${TFVERSION}.tar.gz + + cd tensorflow-${TFVERSION} +#vars for config + export PYTHON_BIN_PATH=${PREFIX}/bin/python3 + export USE_DEFAULT_PYTHON_LIB_PATH=1 + export TF_NEED_JEMALLOC=1 + export TF_NEED_KAFKA=0 + export TF_NEED_OPENCL_SYCL=0 + export TF_NEED_AWS=0 + export TF_NEED_GCP=0 + export TF_NEED_HDFS=0 + export TF_NEED_S3=0 + export TF_ENABLE_XLA=1 + export TF_NEED_GDR=0 + export TF_NEED_VERBS=0 + export TF_NEED_OPENCL=0 + export TF_NEED_MPI=0 + export TF_NEED_TENSORRT=1 + export TF_NEED_NGRAPH=0 + export TF_NEED_IGNITE=0 + export TF_NEED_ROCM=0 + export TF_SET_ANDROID_WORKSPACE=0 + export TF_DOWNLOAD_CLANG=0 + export TF_NCCL_VERSION=2.5 + export TF_IGNORE_MAX_BAZEL_VERSION=1 + export NCCL_INSTALL_PATH=${CUDADIR} + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc + export TF_CUDA_CLANG=0 + export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang + export TF_CUDA_PATHS=${CUDADIR},${CUDADIR}/extras/CUPTI,${CUDADIR}/nvvm + export TF_CUDA_VERSION=$(${CUDADIR}/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') + export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' ${CUDADIR}/include/cudnn.h) + export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5 + export CC_OPT_FLAGS="-march=native" + export TF_NEED_CUDA=1 + + ./configure + bazel build \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + + mkdir tf-src + ./bazel-bin/tensorflow/tools/pip_package/build_pip_package -src ./tf-src + cd tf-src + python3 setup.py build + python3 setup.py install -- prefix $PREFIX + +) # try to load all packages, maybe we can see installation errors python3 -c 'help("modules")' > /dev/null From 65c3b732793f553e822ec6d025cbebd7128fec56 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 13:52:37 +0100 Subject: [PATCH 02/13] remove is not need, the install part is enough --- python-3.7.6-0.build.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 6532b49..550eca0 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -264,24 +264,6 @@ pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mar --with-python=$PREFIX/bin/python3 \ --with-libraries=python,thread || exit 1 - ./b2 \ - $NUMJOBS \ - --layout=system \ - --build-dir=build-python3 \ - --prefix=$PREFIX \ - --libdir=$PREFIX/lib \ - --build-type=minimal \ - toolset=gcc \ - variant=release \ - debug-symbols=off \ - link=shared \ - threading=multi \ - runtime-link=shared \ - python=$PYTHONVER \ - cflags="$PKGCFLAGS" \ - cxxflags="$PKGCFLAGS" \ - stage || exit 1 - ./b2 \ $NUMJOBS \ --layout=system \ From 422537693747c443602b8bef55d7d2ce88c24625 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:12:14 +0100 Subject: [PATCH 03/13] pucuda change lib path --- python-3.7.6-0.build.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 550eca0..5b2f1c5 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -285,12 +285,16 @@ pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mar #pycuda git version to get GL support ( + PYCUDAVERS=2019.1.2 + . ${PREFIX}/profile cd $BUILDDIR - test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git + test -e pycuda-${PYCUDAVERS}.tar.gz || wget https://github.com/inducer/pycuda/archive/v${PYCUDAVERS}/pycuda-${PYCUDAVERS}.tar.gz + test -d pycuda-${PYCUDAVERS} || tar -xf pycuda-${PYCUDAVERS}.tar.gz + #test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git - cd pycuda - git clean -dffx + cd pycuda-${PYCUDAVERS} + test -e siteconf.py && rm siteconf.py python3 configure.py \ --cuda-enable-gl \ --cuda-root=$CUDADIR \ @@ -298,9 +302,9 @@ pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mar --boost-python-libname=boost_python37 \ --boost-inc-dir=$PREFIX/include \ --boost-lib-dir=$PREFIX/lib \ - --cudadrv-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ - --cudart-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ - --curand-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs'\ + --cudadrv-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ + --cudart-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ + --curand-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs'\ --ldflags=-L$PREFIX/lib python3 setup.py install --prefix $PREFIX From 7a1b9080b83b4b242213ea58bd89b6653d7ea542 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:13:09 +0100 Subject: [PATCH 04/13] bazel needs a lot of space --- python-3.7.6-0.build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 5b2f1c5..1dfb51b 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -18,7 +18,7 @@ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin set -xe umask 022 -BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) mkdir -p $BUILD_TMPDIR/home export TMPDIR=$BUILD_TMPDIR From 08775651422a36458c39684a0de850bc5d5dc7f6 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:13:27 +0100 Subject: [PATCH 05/13] latest cudaversion --- python-3.7.6-0.build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 1dfb51b..f69e5e4 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -8,7 +8,7 @@ VERSION=3.7.6 BUILD=0 PYTHONVER=${VERSION%.*} -CUDADIR=/pkg/cuda-10.1.105-0 +CUDADIR=/pkg/cuda-10.2.89-1 PREFIX=/pkg/$PKG-$VERSION-$BUILD if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi From 4dd95b6140e44dab263b0af0f5cc89e4b9974f70 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:14:59 +0100 Subject: [PATCH 06/13] wish from Robert Schoepflin --- python-3.7.6-0.build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index f69e5e4..b5d0575 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -242,6 +242,7 @@ pip3 install --prefix=$PREFIX jupyterlab # request Peter Arndt pip3 install --prefix=$PREFIX jupyterlab-git pip3 install --prefix=$PREFIX libxml2-python3 # required by several bee packages after swich to python3 pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mariux64/pkg-scripts/issues/98 +pip3 install --prefix=$PREFIX multiqc #boost for pycuda ( From 9baa7f534da7e758636167953a18332bc214cdcf Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:16:18 +0100 Subject: [PATCH 07/13] build hic2cool from github --- python-3.7.6-0.build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index b5d0575..6b91ada 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -311,6 +311,37 @@ pip3 install --prefix=$PREFIX multiqc python3 setup.py install --prefix $PREFIX ) +# hic2cool from to stop downgrading python packages +( + HICVERS=0.8.0 + + . ${PREFIX}/profile + cd $BUILDDIR + test -e hic2cool-${HICVERS}.tar.gz || wget https://github.com/4dn-dcic/hic2cool/archive/${HICVERS}/hic2cool-${HICVERS}.tar.gz + test -d hic2cool-${HICVERS} || tar -xf hic2cool-${HICVERS}.tar.gz + + cd hic2cool-${HICVERS} + patch -p1 <<'EOFHIC' +diff --git a/requirements.txt b/requirements.txt +index d7e701b..9d3a01c 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,5 +1,5 @@ +-h5py==2.8.0 +-pandas==0.24.2 +-numpy==1.16.3 +-scipy==1.2.1 +-cooler==0.8.5 ++h5py ++pandas ++numpy ++scipy ++cooler +EOFHIC + pip3 install -r requirements.txt --prefix ${PREFIX} + python3 setup.py install --prefix ${PREFIX} +) + #tensorflow ( TFVERSION=2.1.0 From 6d5f7684e5a11799646f0dd2a246e1ac75970494 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:34:36 +0100 Subject: [PATCH 08/13] tensorflow: make sure tf use the right arch flags --- python-3.7.6-0.build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 6b91ada..08ef735 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -386,19 +386,21 @@ EOFHIC export TF_CUDA_VERSION=$(${CUDADIR}/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' ${CUDADIR}/include/cudnn.h) export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5 - export CC_OPT_FLAGS="-march=native" + export CC_OPT_FLAGS="-march=nehalem" export TF_NEED_CUDA=1 ./configure bazel build \ + --cxxopt="-march=nehalem" \ + --copt="-march=nehalem" \ //tensorflow:libtensorflow.so \ //tensorflow:libtensorflow_cc.so \ //tensorflow:install_headers \ //tensorflow/tools/pip_package:build_pip_package mkdir tf-src - ./bazel-bin/tensorflow/tools/pip_package/build_pip_package -src ./tf-src - cd tf-src + ./bazel-bin/tensorflow/tools/pip_package/build_pip_package -src ${BUILDDIR}/tensorflow-pip + cd ${BUILDDIR}/tensorflow-pip python3 setup.py build python3 setup.py install -- prefix $PREFIX From 88aba6841982a50acb5fa9568e922f554e703ee8 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Mar 2020 14:39:39 +0100 Subject: [PATCH 09/13] no idea --- python-3.7.6-0.build.sh | 413 +--------------------------------------- 1 file changed, 2 insertions(+), 411 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 08ef735..6b47346 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -1,411 +1,2 @@ -#! /bin/bash - -COOKIE=$(mcookie); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh $1 - - -PKG=python -VERSION=3.7.6 -BUILD=0 -PYTHONVER=${VERSION%.*} - -CUDADIR=/pkg/cuda-10.2.89-1 - -PREFIX=/pkg/$PKG-$VERSION-$BUILD -if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi - -PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin - -set -xe -umask 022 - -BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp -test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) -mkdir -p $BUILD_TMPDIR/home -export TMPDIR=$BUILD_TMPDIR -export HOME=$BUILD_TMPDIR/home - -exec $PREFIX/profile <<-EOF - \. $CUDADIR/profile - PATH=$PREFIX/bin:\$PATH - export LD_LIBRARY_PATH=$PREFIX/lib\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH - export PYTHONPATH=$PREFIX/lib/python3.7/site-packages\${PYTHONPATH:+:}\$PYTHONPATH - PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig\${PKG_CONFIG_PATH:+:\$PKG_CONFIG_PATH} - export PKG_CONFIG_PATH - if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi -EOF -. $PREFIX/profile - -export MAKEFLAGS="-j $(nproc)" - -BUILDDIR=$PREFIX/build - -mkdir -p $BUILDDIR -cd $BUILDDIR - -test -e Python-$VERSION.tar.xz || wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz -test -d Python-$VERSION || tar xvf Python-$VERSION.tar.xz -cd Python-$VERSION - -LDFLAGS="-Wl,-rpath=$PREFIX/lib" \ -./configure \ - --prefix=$PREFIX \ - --enable-shared - -make -j $(nproc) -# make test || true # 'test_socket' seems to run for ever -make install - -( # sip: tool to create Python bindings for C and C++ libraries. - cd $PREFIX/build - SIP_VERSION=4.19.18 - SIP_SRC=https://www.riverbankcomputing.com/static/Downloads/sip/$SIP_VERSION/sip-$SIP_VERSION.tar.gz - test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC - test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz - - cd sip-$SIP_VERSION - - python3 configure.py \ - -b $PREFIX/bin \ - -d $PREFIX/lib/python$PYTHONVER/site-packages \ - -e $PREFIX/include/python${PYTHONVER}m \ - -v $PREFIX/share/sip \ - --sip-module=sip - - # well, right here share/sip is spoilage, but maybe some packages will use the decent sip later on ... - mkdir -p $PREFIX/share/sip - make -j $(nproc); - make install -) - - -( # now for the private (sic!) version required by newer PyQt - cd $PREFIX/build - mkdir -p private_sip - cd private_sip - SIP_VERSION=4.19.18 - SIP_SRC=https://www.riverbankcomputing.com/static/Downloads/sip/$SIP_VERSION/sip-$SIP_VERSION.tar.gz - test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC - test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz - - cd sip-$SIP_VERSION - - # note $PREFIX/share/sip/PyQt5 is mandatory - python3 configure.py \ - -d $PREFIX/lib/python$PYTHONVER/site-packages \ - -v $PREFIX/share/sip/PyQt5 \ - --no-tools \ - --sip-module=PyQt5.sip - - mkdir -p $PREFIX/share/sip/PyQt5 - make -j $(nproc) - # The resulting sip.so in site-packages/PyQt5 differs indeed a bit (grep for PyQt5) - make install -) - -( - PYQT_VERSION=5.13.0 - PYQT_SRC=https://www.riverbankcomputing.com/static/Downloads/PyQt5/$PYQT_VERSION/PyQt5_gpl-$PYQT_VERSION.tar.gz - - cd $BUILDDIR - test -e PyQt5_gpl-$PYQT_VERSION.tar.gz || wget $PYQT_SRC - test -d PyQt5_gpl-$PYQT_VERSION || tar -xf PyQt5_gpl-$PYQT_VERSION.tar.gz - - cd PyQt5_gpl-$PYQT_VERSION - - # export QTDIR=/usr/local/qt5 - python3 configure.py \ - -b $PREFIX/bin \ - -d $PREFIX/lib/python$PYTHONVER/site-packages \ - -n $PREFIX/share/qsci \ - -q /usr/local/qt5/bin/qmake \ - -v $PREFIX/share/sip/PyQt5 \ - --sip-incdir=$PREFIX/include/python${PYTHONVER}m \ - --confirm-license \ - --no-qml-plugin \ - --no-designer-plugin \ - --no-dist-info \ - --verbose - - make -j $(nproc) - - # Did I miss something in the docs ??? - # w/o the *.so files inplace a clean 'make install' fails with file not found ... - # -> FileNotFoundError: [Errno 2] No such file or directory: - # '/dev/shm/python-3.7.4-0/lib/python3.7/site-packages/PyQt5/QtCore.so' - mkdir -p $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 - for F in `find | grep '\.so$' | grep -v '/lib'` ; do - cp -vp $F $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5/ - done - make install -) - -( - QSCINTILLA_VERSION=2.11.2 - QSCINTILLA_SRC=https://www.riverbankcomputing.com/static/Downloads/QScintilla/$QSCINTILLA_VERSION/QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz - - cd $BUILDDIR - test -e QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz || wget $QSCINTILLA_SRC - test -d QScintilla_gpl-$QSCINTILLA_VERSION || tar -xf QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz - cd QScintilla_gpl-$QSCINTILLA_VERSION - - cd Python - - # apidir follows PyQt, not Qt (default is: QT_INSTALL_DATA/qsci) - # creation of PEP 376 .dist-info fails in $PREFIX/share - python3 configure.py \ - --pyqt=PyQt5 \ - --qmake=/usr/local/qt5/bin/qmake \ - --apidir=$PREFIX/share/qsci \ - --no-dist-info - - make -j $(nproc) - - # Call it a deja-vu, nerve ... - # -> FileNotFoundError: [Errno 2] No such file or directory: '/dev/shm/python-3.7.4-0/lib/python3.7/site-packages/PyQt5/Qsci.so' - mkdir -p $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 - for F in `find | grep '\.so$' | grep -v '/lib'` ; do - cp -vp $F $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 - done - make install -) - -python3 -m ensurepip -pip3 install --prefix=$PREFIX -I pip - -pip3 install --prefix=$PREFIX ipython[all] - -pip3 install --prefix=$PREFIX SciPy NumPy Matplotlib pandas SymPy nose statsmodels -# clean up some dirt that statsmodels placed also into $PREFIX -rm -vf $PREFIX/LICENSE.txt -rm -vf $PREFIX/setup.cfg - -pip3 install --prefix=$PREFIX Cython - -pip3 install --prefix=$PREFIX pysam -pip3 install --prefix=$PREFIX seaborn -pip3 install --prefix=$PREFIX scikit-learn -#pip3 install --prefix=$PREFIX metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) -pip3 install --prefix=$PREFIX Mako -pip3 install --prefix=$PREFIX meson # required in mariux - -pip3 install --prefix=$PREFIX cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau -pip3 install --prefix=$PREFIX pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla -pip3 install --prefix=$PREFIX blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann - -pip3 install --prefix=$PREFIX umi-tools -pip3 install --prefix=$PREFIX sphinx -pip3 install --prefix=$PREFIX recommonmark -pip3 install --prefix=$PREFIX fastcluster -pip3 install --prefix=$PREFIX pydot -pip3 install --prefix=$PREFIX pygraphviz -pip3 install --prefix=$PREFIX deeptools -pip3 install --prefix=$PREFIX HTSeq -pip3 install --prefix=$PREFIX keras -pip3 install --prefix=$PREFIX MotifScan # Alena 30.8.2018 -pip3 install --prefix=$PREFIX MAmotif -#pip3 install --prefix=$PREFIX hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries -#pip3 install --prefix=$PREFIX hifive # only python 2.7+ -pip3 install --prefix=$PREFIX snakemake -pip3 install --prefix=$PREFIX virtualenv # Donald -pip3 install --prefix=$PREFIX odfpy # Donald -pip3 install --prefix=$PREFIX Dumper # Thomas -pip3 install --prefix=$PREFIX igraph -pip3 install --prefix=$PREFIX louvain # monocle3 prep for Helene -pip3 install --prefix=$PREFIX selenium # 19.7.19 Kreitler -> https://webxray.org/ -pip3 install --prefix=$PREFIX cooltools # Maria Valieva 17.7.2019 -pip3 install --prefix=$PREFIX gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) -pip3 install --prefix=$PREFIX torch -pip3 install --prefix=$PREFIX torchvision -pip3 install --prefix=$PREFIX plotly -pip3 install --prefix=$PREFIX pyOpenCL -pip3 install --prefix=$PREFIX docopt -pip3 install --prefix=$PREFIX dbus-python -pip3 install --prefix=$PREFIX distro -pip3 install --prefix=$PREFIX notify -pip3 install --prefix=$PREFIX ply -pip3 install --prefix=$PREFIX threadpoolctl - -pip3 install --prefix=$PREFIX pyopengl -rm -rf ${PREFIX}/lib/python$PYTHONVER/site-packages/OpenGL/Tk -# create error, so remove it - -# pip3 install --prefix=$PREFIX HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries -pip3 install --prefix=$PREFIX HiCMatrix -pip3 install --prefix=$PREFIX pyGenomeTracks - -pip3 install --prefix=$PREFIX python-bioformats - -pip3 install --prefix=$PREFIX jupyterlab # request Peter Arndt -pip3 install --prefix=$PREFIX jupyterlab-git -pip3 install --prefix=$PREFIX libxml2-python3 # required by several bee packages after swich to python3 -pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mariux64/pkg-scripts/issues/98 -pip3 install --prefix=$PREFIX multiqc - -#boost for pycuda -( - . ${PREFIX}/profile - BOOST_VERSION="1.72.0 1_72_0" - BOOST_SRC=https://dl.bintray.com/boostorg/release/$( echo $BOOST_VERSION | cut -d" " -f1 )/source/boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz - PKGCFLAGS="-O2 -fPIC" - - cd $BUILDDIR - test -e boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz || wget $BOOST_SRC - test -d boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) || mkdir boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) && tar -xf boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz -C boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) --strip-components=1 - - cd boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) - sed -e "/using python/ s|;|: ${PREFIX}/include/python${PYTHONVER}m ;|" \ - -i bootstrap.sh - - ./bootstrap.sh \ - --with-toolset=gcc \ - --with-icu \ - --with-python=$PREFIX/bin/python3 \ - --with-libraries=python,thread || exit 1 - - ./b2 \ - $NUMJOBS \ - --layout=system \ - --build-dir=build-python3 \ - --prefix=$PREFIX \ - --libdir=$PREFIX/lib \ - --build-type=minimal \ - toolset=gcc \ - variant=release \ - debug-symbols=off \ - link=shared \ - threading=multi \ - runtime-link=shared \ - python=$PYTHONVER \ - cflags="$PKGCFLAGS" \ - cxxflags="$PKGCFLAGS" \ - install || exit 1 -) - -#pycuda git version to get GL support -( - PYCUDAVERS=2019.1.2 - - . ${PREFIX}/profile - cd $BUILDDIR - test -e pycuda-${PYCUDAVERS}.tar.gz || wget https://github.com/inducer/pycuda/archive/v${PYCUDAVERS}/pycuda-${PYCUDAVERS}.tar.gz - test -d pycuda-${PYCUDAVERS} || tar -xf pycuda-${PYCUDAVERS}.tar.gz - #test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git - - cd pycuda-${PYCUDAVERS} - test -e siteconf.py && rm siteconf.py - python3 configure.py \ - --cuda-enable-gl \ - --cuda-root=$CUDADIR \ - --no-use-shipped-boost \ - --boost-python-libname=boost_python37 \ - --boost-inc-dir=$PREFIX/include \ - --boost-lib-dir=$PREFIX/lib \ - --cudadrv-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ - --cudart-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ - --curand-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs'\ - --ldflags=-L$PREFIX/lib - - python3 setup.py install --prefix $PREFIX -) - -# hic2cool from to stop downgrading python packages -( - HICVERS=0.8.0 - - . ${PREFIX}/profile - cd $BUILDDIR - test -e hic2cool-${HICVERS}.tar.gz || wget https://github.com/4dn-dcic/hic2cool/archive/${HICVERS}/hic2cool-${HICVERS}.tar.gz - test -d hic2cool-${HICVERS} || tar -xf hic2cool-${HICVERS}.tar.gz - - cd hic2cool-${HICVERS} - patch -p1 <<'EOFHIC' -diff --git a/requirements.txt b/requirements.txt -index d7e701b..9d3a01c 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,5 +1,5 @@ --h5py==2.8.0 --pandas==0.24.2 --numpy==1.16.3 --scipy==1.2.1 --cooler==0.8.5 -+h5py -+pandas -+numpy -+scipy -+cooler -EOFHIC - pip3 install -r requirements.txt --prefix ${PREFIX} - python3 setup.py install --prefix ${PREFIX} -) - -#tensorflow -( - TFVERSION=2.1.0 - TFSRC=https://github.com/tensorflow/tensorflow/archive/v${TFVERSION}/tensorflow-${TFVERSION}.tar.gz - - - . ${PREFIX}/profile - . /pkg/bazel-0.28.1-0/profile - cd $BUILDDIR - test -e tensorflow-${TFVERSION}.tar.gz || wget $TFSRC - test -d tensorflow-${TFVERSION} || tar -xf tensorflow-${TFVERSION}.tar.gz - - cd tensorflow-${TFVERSION} -#vars for config - export PYTHON_BIN_PATH=${PREFIX}/bin/python3 - export USE_DEFAULT_PYTHON_LIB_PATH=1 - export TF_NEED_JEMALLOC=1 - export TF_NEED_KAFKA=0 - export TF_NEED_OPENCL_SYCL=0 - export TF_NEED_AWS=0 - export TF_NEED_GCP=0 - export TF_NEED_HDFS=0 - export TF_NEED_S3=0 - export TF_ENABLE_XLA=1 - export TF_NEED_GDR=0 - export TF_NEED_VERBS=0 - export TF_NEED_OPENCL=0 - export TF_NEED_MPI=0 - export TF_NEED_TENSORRT=1 - export TF_NEED_NGRAPH=0 - export TF_NEED_IGNITE=0 - export TF_NEED_ROCM=0 - export TF_SET_ANDROID_WORKSPACE=0 - export TF_DOWNLOAD_CLANG=0 - export TF_NCCL_VERSION=2.5 - export TF_IGNORE_MAX_BAZEL_VERSION=1 - export NCCL_INSTALL_PATH=${CUDADIR} - export GCC_HOST_COMPILER_PATH=/usr/bin/gcc - export TF_CUDA_CLANG=0 - export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang - export TF_CUDA_PATHS=${CUDADIR},${CUDADIR}/extras/CUPTI,${CUDADIR}/nvvm - export TF_CUDA_VERSION=$(${CUDADIR}/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') - export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' ${CUDADIR}/include/cudnn.h) - export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5 - export CC_OPT_FLAGS="-march=nehalem" - export TF_NEED_CUDA=1 - - ./configure - bazel build \ - --cxxopt="-march=nehalem" \ - --copt="-march=nehalem" \ - //tensorflow:libtensorflow.so \ - //tensorflow:libtensorflow_cc.so \ - //tensorflow:install_headers \ - //tensorflow/tools/pip_package:build_pip_package - - mkdir tf-src - ./bazel-bin/tensorflow/tools/pip_package/build_pip_package -src ${BUILDDIR}/tensorflow-pip - cd ${BUILDDIR}/tensorflow-pip - python3 setup.py build - python3 setup.py install -- prefix $PREFIX - -) -# try to load all packages, maybe we can see installation errors -python3 -c 'help("modules")' > /dev/null - -exit +sudo -u build script -q -e -c "./python-3.7.6-0.build.sh" /package/pkg/python-3.7.6-0/python-3.7.6-0.build.log +bash: ./python-3.7.6-0.build.sh: Text file busy From 9526a67a23620d9595976e7439458471f63a752d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 6 Feb 2020 11:37:50 +0100 Subject: [PATCH 10/13] Update Python to version 3.7.6 --- python-3.7.6-0.build.sh | 331 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 329 insertions(+), 2 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 6b47346..5ba4040 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -1,2 +1,329 @@ -sudo -u build script -q -e -c "./python-3.7.6-0.build.sh" /package/pkg/python-3.7.6-0/python-3.7.6-0.build.log -bash: ./python-3.7.6-0.build.sh: Text file busy +#! /bin/bash + +#COOKIE=$(mcookie); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh $1 + + +PKG=python +VERSION=3.7.6 +BUILD=0 +PYTHONVER=${VERSION%.*} + +CUDADIR=/pkg/cuda-10.1.105-0 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi + +PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin + +set -xe +umask 022 + +BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + \. $CUDADIR/profile + PATH=$PREFIX/bin:\$PATH + export LD_LIBRARY_PATH=$PREFIX/lib\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH + export PYTHONPATH=$PREFIX/lib/python3.7/site-packages\${PYTHONPATH:+:}\$PYTHONPATH + PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig\${PKG_CONFIG_PATH:+:\$PKG_CONFIG_PATH} + export PKG_CONFIG_PATH + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +test -e Python-$VERSION.tar.xz || wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz +test -d Python-$VERSION || tar xvf Python-$VERSION.tar.xz +cd Python-$VERSION + +LDFLAGS="-Wl,-rpath=$PREFIX/lib" \ +./configure \ + --prefix=$PREFIX \ + --enable-shared + +make -j $(nproc) +# make test || true # 'test_socket' seems to run for ever +make install + +( # sip: tool to create Python bindings for C and C++ libraries. + cd $PREFIX/build + SIP_VERSION=4.19.18 + SIP_SRC=https://www.riverbankcomputing.com/static/Downloads/sip/$SIP_VERSION/sip-$SIP_VERSION.tar.gz + test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC + test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz + + cd sip-$SIP_VERSION + + python3 configure.py \ + -b $PREFIX/bin \ + -d $PREFIX/lib/python$PYTHONVER/site-packages \ + -e $PREFIX/include/python${PYTHONVER}m \ + -v $PREFIX/share/sip \ + --sip-module=sip + + # well, right here share/sip is spoilage, but maybe some packages will use the decent sip later on ... + mkdir -p $PREFIX/share/sip + make -j $(nproc); + make install +) + + +( # now for the private (sic!) version required by newer PyQt + cd $PREFIX/build + mkdir -p private_sip + cd private_sip + SIP_VERSION=4.19.18 + SIP_SRC=https://www.riverbankcomputing.com/static/Downloads/sip/$SIP_VERSION/sip-$SIP_VERSION.tar.gz + test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC + test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz + + cd sip-$SIP_VERSION + + # note $PREFIX/share/sip/PyQt5 is mandatory + python3 configure.py \ + -d $PREFIX/lib/python$PYTHONVER/site-packages \ + -v $PREFIX/share/sip/PyQt5 \ + --no-tools \ + --sip-module=PyQt5.sip + + mkdir -p $PREFIX/share/sip/PyQt5 + make -j $(nproc) + # The resulting sip.so in site-packages/PyQt5 differs indeed a bit (grep for PyQt5) + make install +) + +( + PYQT_VERSION=5.13.0 + PYQT_SRC=https://www.riverbankcomputing.com/static/Downloads/PyQt5/$PYQT_VERSION/PyQt5_gpl-$PYQT_VERSION.tar.gz + + cd $BUILDDIR + test -e PyQt5_gpl-$PYQT_VERSION.tar.gz || wget $PYQT_SRC + test -d PyQt5_gpl-$PYQT_VERSION || tar -xf PyQt5_gpl-$PYQT_VERSION.tar.gz + + cd PyQt5_gpl-$PYQT_VERSION + + # export QTDIR=/usr/local/qt5 + python3 configure.py \ + -b $PREFIX/bin \ + -d $PREFIX/lib/python$PYTHONVER/site-packages \ + -n $PREFIX/share/qsci \ + -q /usr/local/qt5/bin/qmake \ + -v $PREFIX/share/sip/PyQt5 \ + --sip-incdir=$PREFIX/include/python${PYTHONVER}m \ + --confirm-license \ + --no-qml-plugin \ + --no-designer-plugin \ + --no-dist-info \ + --verbose + + make -j $(nproc) + + # Did I miss something in the docs ??? + # w/o the *.so files inplace a clean 'make install' fails with file not found ... + # -> FileNotFoundError: [Errno 2] No such file or directory: + # '/dev/shm/python-3.7.4-0/lib/python3.7/site-packages/PyQt5/QtCore.so' + mkdir -p $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 + for F in `find | grep '\.so$' | grep -v '/lib'` ; do + cp -vp $F $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5/ + done + make install +) + +( + QSCINTILLA_VERSION=2.11.2 + QSCINTILLA_SRC=https://www.riverbankcomputing.com/static/Downloads/QScintilla/$QSCINTILLA_VERSION/QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz + + cd $BUILDDIR + test -e QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz || wget $QSCINTILLA_SRC + test -d QScintilla_gpl-$QSCINTILLA_VERSION || tar -xf QScintilla_gpl-$QSCINTILLA_VERSION.tar.gz + cd QScintilla_gpl-$QSCINTILLA_VERSION + + cd Python + + # apidir follows PyQt, not Qt (default is: QT_INSTALL_DATA/qsci) + # creation of PEP 376 .dist-info fails in $PREFIX/share + python3 configure.py \ + --pyqt=PyQt5 \ + --qmake=/usr/local/qt5/bin/qmake \ + --apidir=$PREFIX/share/qsci \ + --no-dist-info + + make -j $(nproc) + + # Call it a deja-vu, nerve ... + # -> FileNotFoundError: [Errno 2] No such file or directory: '/dev/shm/python-3.7.4-0/lib/python3.7/site-packages/PyQt5/Qsci.so' + mkdir -p $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 + for F in `find | grep '\.so$' | grep -v '/lib'` ; do + cp -vp $F $PREFIX/lib/python$PYTHONVER/site-packages/PyQt5 + done + make install +) + +python3 -m ensurepip +pip3 install -I pip + +pip3 install ipython[all] + +pip3 install SciPy NumPy Matplotlib pandas SymPy nose statsmodels +# clean up some dirt that statsmodels placed also into $PREFIX +rm -vf $PREFIX/LICENSE.txt +rm -vf $PREFIX/setup.cfg + +pip3 install Cython + +pip3 install pysam +pip3 install seaborn +pip3 install scikit-learn +#pip3 install metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) +pip3 install Mako +pip3 install meson # required in mariux + +pip3 install cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau +pip3 install pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla +pip3 install blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann + +pip3 install umi-tools +pip3 install sphinx +pip3 install recommonmark +pip3 install fastcluster +pip3 install pydot +pip3 install pygraphviz +pip3 install deeptools +pip3 install HTSeq +pip3 install keras +pip3 install MotifScan # Alena 30.8.2018 +pip3 install MAmotif +#pip3 install hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries +#pip3 install hifive # only python 2.7+ +pip3 install snakemake +pip3 install virtualenv # Donald +pip3 install odfpy # Donald +pip3 install Dumper # Thomas +pip3 install igraph +pip3 install louvain # monocle3 prep for Helene +pip3 install selenium # 19.7.19 Kreitler -> https://webxray.org/ +pip3 install cooltools # Maria Valieva 17.7.2019 +pip3 install gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) +pip3 install tensorflow==2.0.1 # tensorflow-2.1.0 tensorflow-gpu-2.0.1 downgrade dependencies from eachothers +pip3 install tensorflow-gpu==2.0.1 +pip3 install torch +pip3 install torchvision +pip3 install plotly +pip3 install pyOpenCL +pip3 install pyopengl +pip3 install docopt +pip3 install dbus-python +pip3 install distro +pip3 install notify +pip3 install ply +pip3 install threadpoolctl + + +# pip3 install HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries +pip3 install HiCMatrix +pip3 install pyGenomeTracks + +pip3 install python-bioformats + +pip3 install jupyterlab # request Peter Arndt +pip3 install jupyterlab-git +. /pkg/node-12.4.0-0/profile +${PREFIX}/bin/jupyter-labextension install @jupyterlab/github + +#boost for pycuda +( + . ${PREFIX}/profile + BOOST_VERSION="1.72.0 1_72_0" + BOOST_SRC=https://dl.bintray.com/boostorg/release/$( echo $BOOST_VERSION | cut -d" " -f1 )/source/boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz + PKGCFLAGS="-O2 -fPIC" + + cd $BUILDDIR + test -e boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz || wget $BOOST_SRC + test -d boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) || mkdir boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) && tar -xf boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz -C boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) --strip-components=1 + + cd boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) + sed -e "/using python/ s|;|: ${PREFIX}/include/python${PYTHONVER}m ;|" \ + -i bootstrap.sh + + ./bootstrap.sh \ + --with-toolset=gcc \ + --with-icu \ + --with-python=$PREFIX/bin/python3 \ + --with-libraries=python,thread || exit 1 + + ./b2 \ + $NUMJOBS \ + --layout=system \ + --build-dir=build-python3 \ + --prefix=$PREFIX \ + --libdir=$PREFIX/lib \ + --build-type=minimal \ + toolset=gcc \ + variant=release \ + debug-symbols=off \ + link=shared \ + threading=multi \ + runtime-link=shared \ + python=$PYTHONVER \ + cflags="$PKGCFLAGS" \ + cxxflags="$PKGCFLAGS" \ + stage || exit 1 + + ./b2 \ + $NUMJOBS \ + --layout=system \ + --build-dir=build-python3 \ + --prefix=$PREFIX \ + --libdir=$PREFIX/lib \ + --build-type=minimal \ + toolset=gcc \ + variant=release \ + debug-symbols=off \ + link=shared \ + threading=multi \ + runtime-link=shared \ + python=$PYTHONVER \ + cflags="$PKGCFLAGS" \ + cxxflags="$PKGCFLAGS" \ + install || exit 1 +) + +#pycuda git version to get GL support +( + . ${PREFIX}/profile + cd $BUILDDIR + test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git + + cd pycuda + git clean -dffx + python3 configure.py \ + --cuda-enable-gl \ + --cuda-root=$CUDADIR \ + --no-use-shipped-boost \ + --boost-python-libname=boost_python37 \ + --boost-inc-dir=$PREFIX/include \ + --boost-lib-dir=$PREFIX/lib \ + --cudadrv-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ + --cudart-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ + --curand-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs'\ + --ldflags=-L$PREFIX/lib + + python3 setup.py install --prefix $PREFIX +) +# try to load all packages, maybe we can see installation errors +python3 -c 'help("modules")' > /dev/null + +exit From cea7a5181a9ac988b5bb8ebf1e8fba3290cd060e Mon Sep 17 00:00:00 2001 From: david Date: Tue, 25 Feb 2020 09:16:48 +0100 Subject: [PATCH 11/13] python-3.7.6: add prefix on pip pip default is now userdir --- python-3.7.6-0.build.sh | 123 ++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 5ba4040..d4ede28 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -173,73 +173,74 @@ make install ) python3 -m ensurepip -pip3 install -I pip +pip3 install --prefix=$PREFIX -I pip -pip3 install ipython[all] +pip3 install --prefix=$PREFIX ipython[all] -pip3 install SciPy NumPy Matplotlib pandas SymPy nose statsmodels +pip3 install --prefix=$PREFIX SciPy NumPy Matplotlib pandas SymPy nose statsmodels # clean up some dirt that statsmodels placed also into $PREFIX rm -vf $PREFIX/LICENSE.txt rm -vf $PREFIX/setup.cfg -pip3 install Cython - -pip3 install pysam -pip3 install seaborn -pip3 install scikit-learn -#pip3 install metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) -pip3 install Mako -pip3 install meson # required in mariux - -pip3 install cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau -pip3 install pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla -pip3 install blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann - -pip3 install umi-tools -pip3 install sphinx -pip3 install recommonmark -pip3 install fastcluster -pip3 install pydot -pip3 install pygraphviz -pip3 install deeptools -pip3 install HTSeq -pip3 install keras -pip3 install MotifScan # Alena 30.8.2018 -pip3 install MAmotif -#pip3 install hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries -#pip3 install hifive # only python 2.7+ -pip3 install snakemake -pip3 install virtualenv # Donald -pip3 install odfpy # Donald -pip3 install Dumper # Thomas -pip3 install igraph -pip3 install louvain # monocle3 prep for Helene -pip3 install selenium # 19.7.19 Kreitler -> https://webxray.org/ -pip3 install cooltools # Maria Valieva 17.7.2019 -pip3 install gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) -pip3 install tensorflow==2.0.1 # tensorflow-2.1.0 tensorflow-gpu-2.0.1 downgrade dependencies from eachothers -pip3 install tensorflow-gpu==2.0.1 -pip3 install torch -pip3 install torchvision -pip3 install plotly -pip3 install pyOpenCL -pip3 install pyopengl -pip3 install docopt -pip3 install dbus-python -pip3 install distro -pip3 install notify -pip3 install ply -pip3 install threadpoolctl - - -# pip3 install HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries -pip3 install HiCMatrix -pip3 install pyGenomeTracks - -pip3 install python-bioformats - -pip3 install jupyterlab # request Peter Arndt -pip3 install jupyterlab-git +pip3 install --prefix=$PREFIX Cython + +pip3 install --prefix=$PREFIX pysam +pip3 install --prefix=$PREFIX seaborn +pip3 install --prefix=$PREFIX scikit-learn +#pip3 install --prefix=$PREFIX metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) +pip3 install --prefix=$PREFIX Mako +pip3 install --prefix=$PREFIX meson # required in mariux + +pip3 install --prefix=$PREFIX cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau +pip3 install --prefix=$PREFIX pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla +pip3 install --prefix=$PREFIX blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann + +pip3 install --prefix=$PREFIX umi-tools +pip3 install --prefix=$PREFIX sphinx +pip3 install --prefix=$PREFIX recommonmark +pip3 install --prefix=$PREFIX fastcluster +pip3 install --prefix=$PREFIX pydot +pip3 install --prefix=$PREFIX pygraphviz +pip3 install --prefix=$PREFIX deeptools +pip3 install --prefix=$PREFIX HTSeq +pip3 install --prefix=$PREFIX keras +pip3 install --prefix=$PREFIX MotifScan # Alena 30.8.2018 +pip3 install --prefix=$PREFIX MAmotif +#pip3 install --prefix=$PREFIX hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries +#pip3 install --prefix=$PREFIX hifive # only python 2.7+ +pip3 install --prefix=$PREFIX snakemake +pip3 install --prefix=$PREFIX virtualenv # Donald +pip3 install --prefix=$PREFIX odfpy # Donald +pip3 install --prefix=$PREFIX Dumper # Thomas +pip3 install --prefix=$PREFIX igraph +pip3 install --prefix=$PREFIX louvain # monocle3 prep for Helene +pip3 install --prefix=$PREFIX selenium # 19.7.19 Kreitler -> https://webxray.org/ +pip3 install --prefix=$PREFIX cooltools # Maria Valieva 17.7.2019 +pip3 install --prefix=$PREFIX gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) +pip3 install --prefix=$PREFIX tensorflow==2.0.1 # tensorflow-2.1.0 needs spezial libs and nightly version(2.2.0) dont +pip3 install --prefix=$PREFIX torch +pip3 install --prefix=$PREFIX torchvision +pip3 install --prefix=$PREFIX plotly +pip3 install --prefix=$PREFIX pyOpenCL +pip3 install --prefix=$PREFIX docopt +pip3 install --prefix=$PREFIX dbus-python +pip3 install --prefix=$PREFIX distro +pip3 install --prefix=$PREFIX notify +pip3 install --prefix=$PREFIX ply +pip3 install --prefix=$PREFIX threadpoolctl + +pip3 install --prefix=$PREFIX pyopengl +rm -rf ${PREFIX}/lib/python$PYTHONVER/site-packages/OpenGL/Tk +# create error, so remove it + +# pip3 install --prefix=$PREFIX HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries +pip3 install --prefix=$PREFIX HiCMatrix +pip3 install --prefix=$PREFIX pyGenomeTracks + +pip3 install --prefix=$PREFIX python-bioformats + +pip3 install --prefix=$PREFIX jupyterlab # request Peter Arndt +pip3 install --prefix=$PREFIX jupyterlab-git . /pkg/node-12.4.0-0/profile ${PREFIX}/bin/jupyter-labextension install @jupyterlab/github From 9733203166b6ff5b6b3a375bbbf99f158417a024 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 6 Feb 2020 11:37:50 +0100 Subject: [PATCH 12/13] Update Python to version 3.7.6 --- python-3.7.6-0.build.sh | 69 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index d4ede28..0ebfeb6 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -173,15 +173,24 @@ make install ) python3 -m ensurepip +<<<<<<< HEAD pip3 install --prefix=$PREFIX -I pip pip3 install --prefix=$PREFIX ipython[all] pip3 install --prefix=$PREFIX SciPy NumPy Matplotlib pandas SymPy nose statsmodels +======= +pip3 install -I pip + +pip3 install ipython[all] + +pip3 install SciPy NumPy Matplotlib pandas SymPy nose statsmodels +>>>>>>> Update Python to version 3.7.6 # clean up some dirt that statsmodels placed also into $PREFIX rm -vf $PREFIX/LICENSE.txt rm -vf $PREFIX/setup.cfg +<<<<<<< HEAD pip3 install --prefix=$PREFIX Cython pip3 install --prefix=$PREFIX pysam @@ -241,6 +250,66 @@ pip3 install --prefix=$PREFIX python-bioformats pip3 install --prefix=$PREFIX jupyterlab # request Peter Arndt pip3 install --prefix=$PREFIX jupyterlab-git +======= +pip3 install Cython + +pip3 install pysam +pip3 install seaborn +pip3 install scikit-learn +#pip3 install metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) +pip3 install Mako +pip3 install meson # required in mariux + +pip3 install cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau +pip3 install pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla +pip3 install blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann + +pip3 install umi-tools +pip3 install sphinx +pip3 install recommonmark +pip3 install fastcluster +pip3 install pydot +pip3 install pygraphviz +pip3 install deeptools +pip3 install HTSeq +pip3 install keras +pip3 install MotifScan # Alena 30.8.2018 +pip3 install MAmotif +#pip3 install hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries +#pip3 install hifive # only python 2.7+ +pip3 install snakemake +pip3 install virtualenv # Donald +pip3 install odfpy # Donald +pip3 install Dumper # Thomas +pip3 install igraph +pip3 install louvain # monocle3 prep for Helene +pip3 install selenium # 19.7.19 Kreitler -> https://webxray.org/ +pip3 install cooltools # Maria Valieva 17.7.2019 +pip3 install gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) +pip3 install tensorflow==2.0.1 # tensorflow-2.1.0 tensorflow-gpu-2.0.1 downgrade dependencies from eachothers +pip3 install tensorflow-gpu==2.0.1 +pip3 install torch +pip3 install torchvision +pip3 install plotly +pip3 install pyOpenCL +pip3 install pyopengl +pip3 install docopt +pip3 install dbus-python +pip3 install distro +pip3 install notify +pip3 install ply +pip3 install threadpoolctl + + +# pip3 install HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries +pip3 install HiCMatrix +pip3 install pyGenomeTracks + +pip3 install python-bioformats + +pip3 install jupyterlab # request Peter Arndt +pip3 install jupyterlab-git +>>>>>>> Update Python to version 3.7.6 . /pkg/node-12.4.0-0/profile ${PREFIX}/bin/jupyter-labextension install @jupyterlab/github From 572c519cecb49ae1c1c1bf66dee016828a7187e5 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 24 Mar 2020 08:47:57 +0100 Subject: [PATCH 13/13] Python-3.7.6: fix typo --- python-3.7.6-0.build.sh | 243 ++++++++++++++++++++++------------------ 1 file changed, 133 insertions(+), 110 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 0ebfeb6..ed71f94 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -1,6 +1,6 @@ #! /bin/bash -#COOKIE=$(mcookie); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh $1 +COOKIE=$(mcookie); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh $1 PKG=python @@ -8,7 +8,7 @@ VERSION=3.7.6 BUILD=0 PYTHONVER=${VERSION%.*} -CUDADIR=/pkg/cuda-10.1.105-0 +CUDADIR=/pkg/cuda-10.2.89-1 PREFIX=/pkg/$PKG-$VERSION-$BUILD if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi @@ -18,7 +18,7 @@ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin set -xe umask 022 -BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) mkdir -p $BUILD_TMPDIR/home export TMPDIR=$BUILD_TMPDIR @@ -173,24 +173,15 @@ make install ) python3 -m ensurepip -<<<<<<< HEAD pip3 install --prefix=$PREFIX -I pip -pip3 install --prefix=$PREFIX ipython[all] +pip3 install --upgrade --prefix=$PREFIX ipython[all] pip3 install --prefix=$PREFIX SciPy NumPy Matplotlib pandas SymPy nose statsmodels -======= -pip3 install -I pip - -pip3 install ipython[all] - -pip3 install SciPy NumPy Matplotlib pandas SymPy nose statsmodels ->>>>>>> Update Python to version 3.7.6 # clean up some dirt that statsmodels placed also into $PREFIX rm -vf $PREFIX/LICENSE.txt rm -vf $PREFIX/setup.cfg -<<<<<<< HEAD pip3 install --prefix=$PREFIX Cython pip3 install --prefix=$PREFIX pysam @@ -226,7 +217,6 @@ pip3 install --prefix=$PREFIX louvain # monocle3 prep for Helene pip3 install --prefix=$PREFIX selenium # 19.7.19 Kreitler -> https://webxray.org/ pip3 install --prefix=$PREFIX cooltools # Maria Valieva 17.7.2019 pip3 install --prefix=$PREFIX gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) -pip3 install --prefix=$PREFIX tensorflow==2.0.1 # tensorflow-2.1.0 needs spezial libs and nightly version(2.2.0) dont pip3 install --prefix=$PREFIX torch pip3 install --prefix=$PREFIX torchvision pip3 install --prefix=$PREFIX plotly @@ -240,78 +230,19 @@ pip3 install --prefix=$PREFIX threadpoolctl pip3 install --prefix=$PREFIX pyopengl rm -rf ${PREFIX}/lib/python$PYTHONVER/site-packages/OpenGL/Tk -# create error, so remove it +# creates error, so remove it # pip3 install --prefix=$PREFIX HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries pip3 install --prefix=$PREFIX HiCMatrix -pip3 install --prefix=$PREFIX pyGenomeTracks +pip3 install --prefix=$PREFIX pyGenomeTracks #downgrader cooler 0.8.7-> 0.8.5 -pip3 install --prefix=$PREFIX python-bioformats +pip3 install --prefix=$PREFIX python-bioformats #downgrader matplotlib 3.2.0->3.1.1 docutils 0.16 -> 0.15.2 pip3 install --prefix=$PREFIX jupyterlab # request Peter Arndt pip3 install --prefix=$PREFIX jupyterlab-git -======= -pip3 install Cython - -pip3 install pysam -pip3 install seaborn -pip3 install scikit-learn -#pip3 install metaseq # fails (Latest commit fa875d1 on Jan 10, 2017) -pip3 install Mako -pip3 install meson # required in mariux - -pip3 install cutadapt # Helpdesk 01/24/18 16:19, Sabrina Krakau -pip3 install pygobject # Helpdesk 03/26/18 14:19, Virginie Stanisla -pip3 install blink1 # Blink1-lib 07/04/18 12:00, Niclas Hofmann - -pip3 install umi-tools -pip3 install sphinx -pip3 install recommonmark -pip3 install fastcluster -pip3 install pydot -pip3 install pygraphviz -pip3 install deeptools -pip3 install HTSeq -pip3 install keras -pip3 install MotifScan # Alena 30.8.2018 -pip3 install MAmotif -#pip3 install hic2cool # Helpdesk Robert Schoepflin 17.09.2018 Would be a nice to have, but it likes to downgrade too much, pick some cherries -#pip3 install hifive # only python 2.7+ -pip3 install snakemake -pip3 install virtualenv # Donald -pip3 install odfpy # Donald -pip3 install Dumper # Thomas -pip3 install igraph -pip3 install louvain # monocle3 prep for Helene -pip3 install selenium # 19.7.19 Kreitler -> https://webxray.org/ -pip3 install cooltools # Maria Valieva 17.7.2019 -pip3 install gmpy # From viper context (Helpdesk Laura Glaser 9.8.2019) -pip3 install tensorflow==2.0.1 # tensorflow-2.1.0 tensorflow-gpu-2.0.1 downgrade dependencies from eachothers -pip3 install tensorflow-gpu==2.0.1 -pip3 install torch -pip3 install torchvision -pip3 install plotly -pip3 install pyOpenCL -pip3 install pyopengl -pip3 install docopt -pip3 install dbus-python -pip3 install distro -pip3 install notify -pip3 install ply -pip3 install threadpoolctl - - -# pip3 install HiCExplorer # Would be a nice to have, but it likes to downgrade too much, pick some cherries -pip3 install HiCMatrix -pip3 install pyGenomeTracks - -pip3 install python-bioformats - -pip3 install jupyterlab # request Peter Arndt -pip3 install jupyterlab-git ->>>>>>> Update Python to version 3.7.6 -. /pkg/node-12.4.0-0/profile -${PREFIX}/bin/jupyter-labextension install @jupyterlab/github +pip3 install --prefix=$PREFIX libxml2-python3 # required by several bee packages after swich to python3 +pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mariux64/pkg-scripts/issues/98 +pip3 install --prefix=$PREFIX multiqc #boost for pycuda ( @@ -334,24 +265,6 @@ ${PREFIX}/bin/jupyter-labextension install @jupyterlab/github --with-python=$PREFIX/bin/python3 \ --with-libraries=python,thread || exit 1 - ./b2 \ - $NUMJOBS \ - --layout=system \ - --build-dir=build-python3 \ - --prefix=$PREFIX \ - --libdir=$PREFIX/lib \ - --build-type=minimal \ - toolset=gcc \ - variant=release \ - debug-symbols=off \ - link=shared \ - threading=multi \ - runtime-link=shared \ - python=$PYTHONVER \ - cflags="$PKGCFLAGS" \ - cxxflags="$PKGCFLAGS" \ - stage || exit 1 - ./b2 \ $NUMJOBS \ --layout=system \ @@ -373,26 +286,136 @@ ${PREFIX}/bin/jupyter-labextension install @jupyterlab/github #pycuda git version to get GL support ( + PYCUDAVERS=2019.1.2 + . ${PREFIX}/profile cd $BUILDDIR - test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git + test -e pycuda-${PYCUDAVERS}.tar.gz || wget https://github.com/inducer/pycuda/archive/v${PYCUDAVERS}/pycuda-${PYCUDAVERS}.tar.gz + test -d pycuda-${PYCUDAVERS} || tar -xf pycuda-${PYCUDAVERS}.tar.gz + #test -d pycuda || git clone --recursive http://git.tiker.net/trees/pycuda.git - cd pycuda - git clean -dffx + cd pycuda-${PYCUDAVERS} + test -e siteconf.py && rm siteconf.py python3 configure.py \ - --cuda-enable-gl \ - --cuda-root=$CUDADIR \ - --no-use-shipped-boost \ - --boost-python-libname=boost_python37 \ - --boost-inc-dir=$PREFIX/include \ - --boost-lib-dir=$PREFIX/lib \ - --cudadrv-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ - --cudart-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs' \ - --curand-lib-dir='${CUDA_ROOT}/lib64,${CUDA_ROOT}/lib64/stubs'\ - --ldflags=-L$PREFIX/lib + --cuda-enable-gl \ + --cuda-root=$CUDADIR \ + --no-use-shipped-boost \ + --boost-python-libname=boost_python37 \ + --boost-inc-dir=$PREFIX/include \ + --boost-lib-dir=$PREFIX/lib \ + --cudadrv-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ + --cudart-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs' \ + --curand-lib-dir='${CUDA_ROOT}/lib,${CUDA_ROOT}/lib/stubs'\ + --ldflags=-L$PREFIX/lib python3 setup.py install --prefix $PREFIX ) + +# hic2cool from source to stop downgrading python packages +( + HICVERS=0.8.0 + + . ${PREFIX}/profile + cd $BUILDDIR + test -e hic2cool-${HICVERS}.tar.gz || wget https://github.com/4dn-dcic/hic2cool/archive/${HICVERS}/hic2cool-${HICVERS}.tar.gz + test -d hic2cool-${HICVERS} || tar -xf hic2cool-${HICVERS}.tar.gz + + cd hic2cool-${HICVERS} + + if $( grep '==' requirements.txt >/dev/null ); then + patch -p1 <<'EOFHIC' +diff --git a/requirements.txt b/requirements.txt +index d7e701b..9d3a01c 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,5 +1,5 @@ +-h5py==2.8.0 +-pandas==0.24.2 +-numpy==1.16.3 +-scipy==1.2.1 +-cooler==0.8.5 ++h5py ++pandas ++numpy ++scipy ++cooler +EOFHIC +fi + pip3 install -r requirements.txt --prefix ${PREFIX} + python3 setup.py install --prefix ${PREFIX} +) + +#tensorflow +( + TFVERSION=2.1.0 + TFSRC=https://github.com/tensorflow/tensorflow/archive/v${TFVERSION}/tensorflow-${TFVERSION}.tar.gz + + + . ${PREFIX}/profile + . /pkg/bazel-0.28.1-0/profile + cd $BUILDDIR + test -e tensorflow-${TFVERSION}.tar.gz || wget $TFSRC + test -d tensorflow-${TFVERSION} || tar -xf tensorflow-${TFVERSION}.tar.gz + + cd tensorflow-${TFVERSION} +#vars for config + export PYTHON_BIN_PATH=${PREFIX}/bin/python3 + export USE_DEFAULT_PYTHON_LIB_PATH=1 + export TF_NEED_JEMALLOC=1 + export TF_NEED_KAFKA=0 + export TF_NEED_OPENCL_SYCL=0 + export TF_NEED_AWS=0 + export TF_NEED_GCP=0 + export TF_NEED_HDFS=0 + export TF_NEED_S3=0 + export TF_ENABLE_XLA=1 + export TF_NEED_GDR=0 + export TF_NEED_VERBS=0 + export TF_NEED_OPENCL=0 + export TF_NEED_MPI=0 + export TF_NEED_TENSORRT=1 + export TF_NEED_NGRAPH=0 + export TF_NEED_IGNITE=0 + export TF_NEED_ROCM=0 + export TF_SET_ANDROID_WORKSPACE=0 + export TF_DOWNLOAD_CLANG=0 + export TF_NCCL_VERSION=2.5 + export TF_IGNORE_MAX_BAZEL_VERSION=1 + export NCCL_INSTALL_PATH=${CUDADIR} + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc + export TF_CUDA_CLANG=0 + export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang + export TF_CUDA_PATHS=${CUDADIR},${CUDADIR}/extras/CUPTI,${CUDADIR}/nvvm + export TF_CUDA_VERSION=$(${CUDADIR}/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') + export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' ${CUDADIR}/include/cudnn.h) + export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5 + export CC_OPT_FLAGS="-march=nehalem" + export TF_NEED_CUDA=1 + + ./configure + bazel build \ + --cxxopt="-march=nehalem" \ + --copt="-march=nehalem" \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + + test -d tensorflow-pip && rm -rf tensorflow-pip + mkdir tensorflow-pip + ./bazel-bin/tensorflow/tools/pip_package/build_pip_package --src ${BUILDDIR}/tensorflow-pip + cd ${BUILDDIR} + #remove symlinks into TMPDIR + test -e tensorflow-pip.tar && rm tensorflow-pip.tar + tar -chf tensorflow-pip.tar tensorflow-pip + test -d tensorflow-pip && rm -rf tensorflow-pip + + tar -xf tensorflow-pip.tar + cd ${BUILDDIR}/tensorflow-pip + python3 setup.py build + python3 setup.py install --prefix $PREFIX + +) # try to load all packages, maybe we can see installation errors python3 -c 'help("modules")' > /dev/null