Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for building incl. CUDA support #5

Open
JBludau opened this issue Dec 12, 2022 · 2 comments
Open

Dockerfile for building incl. CUDA support #5

JBludau opened this issue Dec 12, 2022 · 2 comments

Comments

@JBludau
Copy link
Contributor

JBludau commented Dec 12, 2022

FROM nvidia/cuda:11.8.0-devel-ubuntu22.04

LABEL description="jb/pykokkos_dev_nvidia"

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq  \
    python3 \
    python3-pip \
    pybind11-dev \
    python3-pybind11 \
    cmake \
    git \
    curl \
    ninja-build \
    patchelf \
    vim \
    zsh \
    fonts-powerline \
    && \
  apt-get clean && \
  rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/kokkos/kokkos.git && \
    cd kokkos && \
    git checkout tags/3.7.01 -b 3.7.01 && \
    mkdir -p /lib/kokkos/3.7.01 && \
    mkdir build && \
    cd build && \
    cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_AMPERE80=ON -DCMAKE_CXX_STANDARD=14 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=ON -DKokkos_ENABLE_DEPRECATED_CODE_3=ON -DCMAKE_INSTALL_PREFIX=/lib/kokkos/3.7.01 && \
    make  && \
    make install

RUN git clone https://github.com/arborx/ArborX.git &&\
    cd ArborX &&\
    git switch -t origin/arborx-1.3 &&\
    mkdir -p /lib/arborx/1.3 &&\
    mkdir build &&\
    cd build &&\
    cmake .. -DCMAKE_INSTALL_PREFIX="/lib/arborx/1.3" -DKokkos_ROOT="/lib/kokkos/3.7.01"  -DCMAKE_CXX_EXTENSIONS=OFF &&\
    make &&\
    make install


RUN git clone https://github.com/arborx/pyArborX.git && \
  cd pyArborX &&\
  mkdir build &&\
  cd build &&\
  cmake .. -DCMAKE_PREFIX_PATH=/lib/arborx/1.3 -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS=Off -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=Off&&\
  make &&\
  cd /pyArborX &&\
  pip install --user -e .

RUN pip3 install scikit-build numpy pytest cupy && \
  git clone https://github.com/kokkos/pykokkos-base.git && \
  cd pykokkos-base && \
  python3 setup.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=4 -DENABLE_THREADS=OFF -DENABLE_CUDA=ON -DENABLE_OPENMP=ON -DENABLE_INTERNAL_KOKKOS=OFF -DCMAKE_PREFIX_PATH=/lib/kokkos/3.7.01

RUN git clone https://github.com/kokkos/pykokkos.git && \
  cd pykokkos && \
  git checkout develop && \
  pip3 install --user -e .
@JBludau
Copy link
Contributor Author

JBludau commented Dec 12, 2022

This should create a docker container and install pyarborx. I will add some explanations in the next days

@JBludau
Copy link
Contributor Author

JBludau commented Dec 12, 2022

I will try to talk to nader about the state of the open prs on pykokkos this week and add one for the BVH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant