Skip to content
Snippets Groups Projects
Commit 97dc7162 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

added nvidia opencl docker image based on official cuda dockerhub

parent bb0d3626
No related branches found
No related tags found
1 merge request!10Resolve "Fix default parameters for the periodic bubble example"
Pipeline #9956 passed
...@@ -8,13 +8,13 @@ stages: ...@@ -8,13 +8,13 @@ stages:
- test - test
env:bionic: env:bionic:
image: keckj/hysop:ubuntu_bionic image: keckj/hysop:ubuntu_bionic_cuda
stage: env stage: env
script: script:
- "sh ci/scripts/version.sh" - "sh ci/scripts/version.sh"
config:bionic: config:bionic:
image: keckj/hysop:ubuntu_bionic image: keckj/hysop:ubuntu_bionic_cuda
stage: configure stage: configure
script: script:
- "sh ci/scripts/config.sh $CI_PROJECT_DIR/build/gcc-7 $CI_PROJECT_DIR/install/gcc-7 gcc-7 g++-7 gfortran-7" - "sh ci/scripts/config.sh $CI_PROJECT_DIR/build/gcc-7 $CI_PROJECT_DIR/install/gcc-7 gcc-7 g++-7 gfortran-7"
...@@ -26,7 +26,7 @@ config:bionic: ...@@ -26,7 +26,7 @@ config:bionic:
- $CI_PROJECT_DIR/build - $CI_PROJECT_DIR/build
build:bionic: build:bionic:
image: keckj/hysop:ubuntu_bionic image: keckj/hysop:ubuntu_bionic_cuda
stage: build stage: build
script: script:
- "sh ci/scripts/build.sh $CI_PROJECT_DIR/build/gcc-7 gcc-7 g++-7 gfortran-7" - "sh ci/scripts/build.sh $CI_PROJECT_DIR/build/gcc-7 gcc-7 g++-7 gfortran-7"
...@@ -38,7 +38,7 @@ build:bionic: ...@@ -38,7 +38,7 @@ build:bionic:
- $CI_PROJECT_DIR/build - $CI_PROJECT_DIR/build
install:bionic: install:bionic:
image: keckj/hysop:ubuntu_bionic image: keckj/hysop:ubuntu_bionic_cuda
stage: install stage: install
script: script:
- "sh ci/scripts/install.sh $CI_PROJECT_DIR/build/gcc-7 $CI_PROJECT_DIR/install/gcc-7" - "sh ci/scripts/install.sh $CI_PROJECT_DIR/build/gcc-7 $CI_PROJECT_DIR/install/gcc-7"
...@@ -49,7 +49,7 @@ install:bionic: ...@@ -49,7 +49,7 @@ install:bionic:
- $CI_PROJECT_DIR/install - $CI_PROJECT_DIR/install
test:bionic: test:bionic:
image: keckj/hysop:ubuntu_bionic image: keckj/hysop:ubuntu_bionic_cuda
stage: test stage: test
script: script:
- "sh ci/scripts/test.sh $CI_PROJECT_DIR/install/gcc-7 $CI_PROJECT_DIR/hysop $CI_PROJECT_DIR/cache" - "sh ci/scripts/test.sh $CI_PROJECT_DIR/install/gcc-7 $CI_PROJECT_DIR/hysop $CI_PROJECT_DIR/cache"
......
# Test docker for gitlab-ci
FROM nvidia/cuda:9.2-devel-ubuntu18.04
MAINTAINER Jean-Baptiste.Keck@imag.fr
# upgrade initial image
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get full-upgrade -y
# get build tools and required libraries
RUN apt-get install -y expat
RUN apt-get install -y unzip
RUN apt-get install -y xz-utils
RUN apt-get install -y automake
RUN apt-get install -y libtool
RUN apt-get install -y pkg-config
RUN apt-get install -y cmake
RUN apt-get install -y git
RUN apt-get install -y vim
RUN apt-get install -y ssh
RUN apt-get install -y gcc
RUN apt-get install -y gfortran
RUN apt-get install -y cython
RUN apt-get install -y swig
RUN apt-get install -y lsb-core
RUN apt-get install -y cpio
RUN apt-get install -y libnuma1
RUN apt-get install -y libpciaccess0
RUN apt-get install -y libreadline-dev
RUN apt-get install -y libboost-all-dev
RUN apt-get install -y libblas-dev
RUN apt-get install -y liblapack-dev
RUN apt-get install -y libcgal-dev
RUN apt-get install -y libatlas-base-dev
RUN apt-get install -y libopenblas-dev
RUN apt-get install -y libgfortran3
RUN apt-get install -y libgcc1
RUN apt-get install -y libopenmpi-dev
RUN apt-get install -y libhdf5-openmpi-dev
RUN apt-get install -y libfftw3-dev
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 libsparsehash-dev
RUN apt-get install -y libcairo-dev
RUN apt-get install -y libcairomm-1.0-dev
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 opencl-headers
RUN apt-get install -y ocl-icd-libopencl1
RUN apt-get install -y clinfo
# python packages
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --upgrade backports.weakref
RUN pip install --upgrade cffi
RUN pip install --upgrade wheel
RUN pip install --upgrade pytest
RUN pip install --upgrade numpy
RUN pip install --upgrade scipy
RUN pip install --upgrade sympy
RUN pip install --upgrade matplotlib
RUN pip install --upgrade mpi4py
RUN pip install --upgrade sphinx
RUN pip install --upgrade h5py
RUN pip install --upgrade gmpy2
RUN pip install --upgrade psutil
RUN pip install --upgrade py-cpuinfo
RUN pip install --upgrade Mako
RUN pip install --upgrade subprocess32
RUN pip install --upgrade editdistance
RUN pip install --upgrade portalocker
RUN pip install --upgrade colors.py
RUN pip install --upgrade tee
RUN pip install --upgrade primefac
RUN pip install --upgrade pycairo
RUN pip install --upgrade weave
RUN pip install --upgrade argparse_color_formatter
# scitools (python-scitools does not exist on ubuntu:bionic)
RUN cd /tmp \
&& git clone https://github.com/hplgit/scitools \
&& 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 \
&& 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
# pyopencl
RUN cd /tmp \
&& git clone https://github.com/inducer/pyopencl \
&& cd pyopencl \
&& git submodule update --init \
&& ./configure.py \
&& make \
&& 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 - \
&& rm -Rf /tmp/clFFT
# gpyFFT
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 \
&& pip install . \
&& cd - \
&& rm -Rf /tmp/pyFFTW
# Fix nvidia opencl icd
RUN echo "/usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
# ensure all libraries are known by the runtime linker
RUN ldconfig
# clean cached packages
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf $HOME/.cache/pip/*
RUN rm -rf /tmp/*
CMD ["/bin/bash"]
...@@ -52,19 +52,19 @@ python -c 'import hysop; print hysop' ...@@ -52,19 +52,19 @@ python -c 'import hysop; print hysop'
#python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_advection.py" #python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_advection.py"
#python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_remesh.py" #python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_remesh.py"
#python "$HYSOP_DIR/core/arrays/tests/test_array.py" python "$HYSOP_DIR/core/arrays/tests/test_array.py"
#$HYSOP_DIR/fields/tests/test_cartesian.sh $HYSOP_DIR/fields/tests/test_cartesian.sh
#python "$HYSOP_DIR/operator/tests/test_analytic.py" python "$HYSOP_DIR/operator/tests/test_analytic.py"
#python "$HYSOP_DIR/operator/tests/test_transpose.py" python "$HYSOP_DIR/operator/tests/test_transpose.py"
#python "$HYSOP_DIR/operator/tests/test_derivative.py" python "$HYSOP_DIR/operator/tests/test_derivative.py"
#python "$HYSOP_DIR/operator/tests/test_poisson.py" python "$HYSOP_DIR/operator/tests/test_poisson.py"
#python "$HYSOP_DIR/operator/tests/test_poisson_rotational.py" python "$HYSOP_DIR/operator/tests/test_poisson_rotational.py"
#python "$HYSOP_DIR/operator/tests/test_solenoidal_projection.py" python "$HYSOP_DIR/operator/tests/test_solenoidal_projection.py"
#python "$HYSOP_DIR/operator/tests/test_custom_symbolic.py" python "$HYSOP_DIR/operator/tests/test_custom_symbolic.py"
#python "$HYSOP_DIR/operator/tests/test_directional_advection.py" python "$HYSOP_DIR/operator/tests/test_directional_advection.py"
#python "$HYSOP_DIR/operator/tests/test_directional_diffusion.py" python "$HYSOP_DIR/operator/tests/test_directional_diffusion.py"
#python "$HYSOP_DIR/operator/tests/test_diffusion.py" python "$HYSOP_DIR/operator/tests/test_diffusion.py"
#python "$HYSOP_DIR/operator/tests/test_directional_stretching.py" python "$HYSOP_DIR/operator/tests/test_directional_stretching.py"
EXAMPLE_DIR="$HYSOP_DIR/../examples" EXAMPLE_DIR="$HYSOP_DIR/../examples"
EXAMPLE_OPTIONS='-maxit 1' EXAMPLE_OPTIONS='-maxit 1'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment