diff --git a/ci/docker_images/ubuntu/disco/Dockerfile b/ci/docker_images/ubuntu/disco/Dockerfile index b786b49db02d899ff4dded2a887158999aab7626..7372a81686e6f8576fa3f8696f8130d394c51ae1 100644 --- a/ci/docker_images/ubuntu/disco/Dockerfile +++ b/ci/docker_images/ubuntu/disco/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update RUN apt-get full-upgrade -y # get build tools and required libraries +RUN apt-get install -y apt-utils RUN apt-get install -y expat RUN apt-get install -y unzip RUN apt-get install -y xz-utils @@ -42,6 +43,7 @@ RUN apt-get install -y libfftw3-mpi-dev RUN apt-get install -y libgmp-dev RUN apt-get install -y libmpfr-dev RUN apt-get install -y libmpc-dev +RUN apt-get install -y libflint-dev RUN apt-get install -y libsparsehash-dev RUN apt-get install -y libcairo-dev RUN apt-get install -y libcairomm-1.0-dev @@ -49,11 +51,14 @@ RUN apt-get install -y python RUN apt-get install -y python-dev RUN apt-get install -y python-pip RUN apt-get install -y python-tk +RUN apt-get install -y python-backports.weakref +RUN apt-get install -y python-backports.functools-lru-cache RUN apt-get install -y opencl-headers RUN apt-get install -y ocl-icd-libopencl1 RUN apt-get install -y clinfo +RUN apt-get install -y clang -# python packages +# some python packages RUN pip install --upgrade pip RUN pip install --upgrade setuptools RUN pip install --upgrade backports.weakref @@ -80,170 +85,123 @@ RUN pip install --upgrade pycairo RUN pip install --upgrade weave RUN pip install --upgrade argparse_color_formatter RUN pip install --upgrade numba - -# For documentation -# RUN pip install --upgrade sphinx -# RUN pip install --upgrade sphinxcontrib-bibtex -# RUN pip install --upgrade sphinx_bootstrap_theme -# RUN pip install --upgrade strip-hints -# RUN cd /tmp && git clone https://github.com/sphinx-contrib/doxylink.git && cd doxylink/sphinxcontrib/doxylink \ -# && mv doxylink.py doxylink.py3 && strip-hints doxylink.py3 > doxylink.py && rm doxylink.py3 \ -# && mv parsing.py parsing.py3 && strip-hints parsing.py3 > parsing.py && rm parsing.py3 \ -# && cd ../.. && python setup.py install - - -# scitools (python-scitools does not exist on ubuntu:bionic) -RUN cd /tmp \ +RUN pip install --upgrade pybind11 + +# documentation +RUN pip install --upgrade sphinx +RUN pip install --upgrade sphinxcontrib-bibtex +RUN pip install --upgrade sphinx_bootstrap_theme +RUN pip install --upgrade strip-hints +RUN cd /tmp && git clone https://github.com/sphinx-contrib/doxylink.git && cd doxylink/sphinxcontrib/doxylink \ + && mv doxylink.py doxylink.py3 && strip-hints doxylink.py3 > doxylink.py && rm doxylink.py3 \ + && mv parsing.py parsing.py3 && strip-hints parsing.py3 > parsing.py && rm parsing.py3 \ + && cd ../.. && python setup.py install + +# scitools (python-scitools does not exist on ubuntu:disco) +RUN cd /tmp \ && git clone https://github.com/hplgit/scitools \ - && cd scitools \ - && pip install . \ - && cd - \ + && cd scitools \ + && pip install . \ + && cd - \ && rm -Rf /tmp/scitools -# patchelf -RUN cd /tmp \ - && git clone https://github.com/NixOS/patchelf \ - && cd patchelf \ - && ./bootstrap.sh \ - && ./configure \ - && make \ - && make install \ - && cd - \ - && rm -Rf /tmp/patchelf - -RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ - && echo 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main' >> /etc/apt/sources.list \ - && echo 'deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main' >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install --assume-yes llvm-3.9 clang-3.9 libllvm3.9 libclang-3.9-dev - -# Intel OpenCl -RUN cd /tmp \ -&& mkdir intel \ -&& cd intel \ -&& wget http://registrationcenter-download.intel.com/akdlm/irc_nas/12556/opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz \ -&& tar -xvzf opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz \ -&& cd opencl_runtime_16.1.2_x64_rh_6.4.0.37 \ -&& ls -la \ -&& sed -i "s/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g" "silent.cfg" \ -&& ./install.sh --silent ./silent.cfg \ -&& cd /tmp \ +# Intel OpenCl runtime +RUN cd /tmp \ +&& mkdir intel \ +&& cd intel \ +&& wget http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/15532/l_opencl_p_18.1.0.015.tgz \ +&& tar -xvzf l_opencl_p_18.1.0.015.tgz \ +&& cd l_opencl_p_18.1.0.015 \ +&& sed -i "s/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g" "silent.cfg" \ +&& ./install.sh --silent ./silent.cfg \ +&& cd /tmp \ && rm -Rf /tmp/intel -# Fix OpenCl ICD -RUN ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/lib/x86_64-linux-gnu/libOpenCL.so -RUN ldconfig +# clpeak +RUN cd /tmp \ +&& git clone https://github.com/krrishnarraj/clpeak \ +&& cd clpeak/ \ +&& mkdir build \ +&& cd build/ \ +&& cmake .. \ +&& make -j$(nproc) \ +&& mv clpeak /usr/local/bin/ \ +&& cd - \ +&& rm -Rf /tmp/clpeak # pyopencl -RUN cd /tmp \ -&& pip install pybind11 \ -&& git clone https://github.com/inducer/pyopencl \ -&& cd pyopencl \ -&& git submodule update --init \ -&& ./configure.py \ -&& make \ -&& pip install --upgrade . \ -&& cd - \ +RUN cd /tmp \ +&& git clone https://github.com/inducer/pyopencl \ +&& cd pyopencl \ +&& git submodule update --init \ +&& ./configure.py \ +&& make -j$(nproc) \ +&& pip install --upgrade . \ +&& cd - \ && rm -Rf /tmp/pyopencl -# oclgrind -RUN apt-get install --assume-yes --allow-unauthenticated llvm-6.0 clang-6.0 libllvm6.0 libclang-6.0-dev -RUN cd /tmp \ - && git clone https://github.com/jrprice/Oclgrind \ - && cd Oclgrind \ - && mkdir build \ - && cd build \ - && cmake -DCMAKE_BUILD_TYPE=Release .. \ - && make \ - && make install \ - && cd - \ - && rm -Rf /tmp/Oclgrind - -# clpeak -RUN cd /tmp \ - && git clone https://github.com/krrishnarraj/clpeak \ - && cd clpeak/ \ - && mkdir build \ - && cd build/ \ - && cmake .. \ - && make \ - && mv clpeak /usr/local/bin/ \ - && cd - \ - && rm -Rf /tmp/clpeak - # clFFT -RUN cd /tmp \ - && ln -s /usr/local/lib /usr/local/lib64 \ - && git clone https://github.com/clMathLibraries/clFFT \ - && cd clFFT \ - && cd src \ - && mkdir build \ - && cd build \ - && cmake -DCMAKE_BUILD_TYPE=Release .. \ - && make \ - && make install \ - && cd - \ +RUN cd /tmp \ + && ln -s /usr/local/lib /usr/local/lib64 \ + && git clone https://github.com/clMathLibraries/clFFT \ + && cd clFFT \ + && cd src \ + && mkdir build \ + && cd build \ + && cmake -DCMAKE_BUILD_TYPE=Release .. \ + && make -j$(nproc) \ + && make install \ + && cd - \ && rm -Rf /tmp/clFFT # gpyFFT -RUN cd /tmp \ - && git clone https://github.com/geggo/gpyfft \ - && cd gpyfft \ - && pip install . \ - && cd - \ +RUN cd /tmp \ + && git clone https://github.com/geggo/gpyfft \ + && cd gpyfft \ + && pip install . \ + && cd - \ && rm -Rf /tmp/gpyfft -# python graphtools -RUN cd /tmp \ - && wget https://downloads.skewed.de/graph-tool/graph-tool-2.26.tar.bz2 \ - && tar -xvjf graph-tool-2.26.tar.bz2 \ - && cd graph-tool-2.26 \ - && ./autogen.sh \ - && mkdir pycairo   \ - && find /usr/ -name 'pycairo.h' -exec cp {} ./pycairo/pycairo.h \; \ - && CPPFLAGS=-I. ./configure \ - && CPPFLAGS=-I. make -j16 \ - && make install \ - && cd - \ - && rm -Rf /tmp/graph-tool-2.26 - -# clang 6 for hysop build test -RUN apt-get install -y clang - # pyfftw (with R2R transforms - experimental branch) -RUN cd /tmp \ - && git clone https://github.com/drwells/pyFFTW \ - && cd pyFFTW \ - && git checkout r2r-try-two \ +RUN cd /tmp \ + && git clone https://github.com/drwells/pyFFTW \ + && cd pyFFTW \ + && git checkout r2r-try-two \ && sed -i 's/\(fftw3[fl]\?_\)threads/\1omp/g' setup.py \ - && pip install . \ - && cd - \ + && pip install . \ + && cd - \ && rm -Rf /tmp/pyFFTW # python-flint RUN cd /tmp \ - && wget http://flintlib.org/flint-2.5.2.tar.gz \ - && tar -xvzf flint-2.5.2.tar.gz \ - && cd flint-2.5.2 \ - && ./configure \ - && make -j16 \ - && make install \ - && cd - \ - && rm -Rf flint-2.5.2 \ && wget https://github.com/fredrik-johansson/arb/archive/2.16.0.tar.gz \ && tar -xvzf 2.16.0.tar.gz \ && cd arb-2.16.0 \ && ./configure \ - && make -j16 \ + && make -j$(nproc) \ && make install \ && cd - \ - && rm -Rf arb-2.16.0 \ + && rm -Rf arb-2.16.0 +RUN cd /tmp \ && git clone https://github.com/fredrik-johansson/python-flint \ && cd python-flint \ && pip install . \ && cd - \ && rm -Rf python-flint +# python graphtools +RUN cd /tmp \ + && wget https://downloads.skewed.de/graph-tool/graph-tool-2.28.tar.bz2 \ + && tar -xvjf graph-tool-2.28.tar.bz2 \ + && cd graph-tool-2.28 \ + && ./autogen.sh \ + && mkdir pycairo   \ + && find /usr/ -name 'pycairo.h' -exec cp {} ./pycairo/pycairo.h \; \ + && CPPFLAGS=-I. ./configure \ + && CPPFLAGS=-I. make -j16 \ + && make install \ + && cd - \ + && rm -Rf /tmp/graph-tool-2.28 # ensure all libraries are known by the runtime linker RUN ldconfig