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

try nvidia torch image for Exa.TrkX #91

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 2 additions & 56 deletions ubuntu2004_exatrkx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
FROM nvcr.io/nvidia/pytorch:22.12-py3

LABEL description="Ubuntu 20.04 with Acts dependencies for the Exa.TrkX Plugin"
LABEL maintainer="Paul Gessinger <[email protected]"
Expand Down Expand Up @@ -51,7 +51,7 @@ RUN apt-get update -y \
ENV GET curl --location --silent --create-dirs
ENV UNPACK_TO_SRC tar -xz --strip-components=1 --directory src
ENV PREFIX /usr/local
ENV CUDA_ARCH 75;86
ENV CUDA_ARCH 86

# CMake 3.16.3 version in APT is too old
# requires rsync; installation uses `rsync` instead of `install`
Expand Down Expand Up @@ -82,60 +82,6 @@ RUN mkdir src \
&& cmake --build build -- install \
&& rm -rf build src

# libtorch (unzip cannot be used in a pipe...)
ENV LIBTORCH_URL_GPU https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip
ENV LIBTORCH_URL_CPU https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip

RUN ${GET} --output libtorch.zip ${LIBTORCH_URL_GPU} \
&& unzip libtorch.zip \
&& rsync -ruv libtorch/ ${PREFIX} \
&& rm -rf libtorch*

# torch-scatter
# I have absolutely no clue why I need this __CUDA_NO_HALF_CONVERSIONS__, but it fails to compile if not set...
RUN mkdir src \
&& ${GET} https://github.com/rusty1s/pytorch_scatter/archive/refs/tags/2.0.9.tar.gz \
| ${UNPACK_TO_SRC} \
&& cmake -B build -S src -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DWITH_CUDA=ON \
-DCMAKE_CUDA_FLAGS=-D__CUDA_NO_HALF_CONVERSIONS__ \
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCH} \
&& cmake --build build -- install \
&& rm -rf build src

# ROOT
RUN mkdir src \
&& ${GET} https://root.cern/download/root_v6.24.06.source.tar.gz \
| ${UNPACK_TO_SRC} \
&& cmake -B build -S src -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-Dfail-on-missing=ON \
-Dgminimal=ON \
-Dgdml=ON \
-Dopengl=ON \
-Dpyroot=ON \
&& cmake --build build -- install \
&& rm -rf build src

# cugraph
RUN mkdir src \
&& ${GET} https://github.com/rapidsai/cugraph/archive/refs/tags/v22.02.00.tar.gz \
| ${UNPACK_TO_SRC} \
&& cmake -B build -S src/cpp -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCH} \
-DBUILD_TESTS=OFF \
-DBUILD_CUGRAPH_MG_TESTS=OFF \
&& cmake --build build -- install \
&& rm -rf build src

# Onnx (download of tar.gz does not work out of the box, since the build.sh script requires a git repository)
RUN git clone https://github.com/microsoft/onnxruntime src \
&& (cd src && git checkout v1.13.1) \
Expand Down