Skip to content

Commit

Permalink
Add support for CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
shrijitsingh99 committed May 30, 2020
1 parent b42b090 commit 374ef29
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .ci/azure-pipelines/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ stages:
CONTAINER: env1604
CC: gcc
CXX: g++
BUILD_GPU: OFF
CMAKE_ARGS: '-DPCL_WARNINGS_ARE_ERRORS=ON'
20.04 GCC:
CONTAINER: env2004
CC: gcc
CXX: g++
BUILD_GPU: OFF
CMAKE_ARGS: ''
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
Expand Down Expand Up @@ -83,6 +85,7 @@ stages:
CONTAINER: env1804
CC: clang
CXX: clang++
BUILD_GPU: ON
CMAKE_ARGS: ''
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
Expand Down
8 changes: 7 additions & 1 deletion .ci/azure-pipelines/build/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ steps:
-DBUILD_apps_cloud_composer=ON \
-DBUILD_apps_in_hand_scanner=ON \
-DBUILD_apps_modeler=ON \
-DBUILD_apps_point_cloud_editor=ON
-DBUILD_apps_point_cloud_editor=ON \
-DBUILD_CUDA=$BUILD_GPU \
-DBUILD_GPU=$BUILD_GPU \
-DBUILD_cuda_io=$BUILD_GPU \
-DBUILD_gpu_tracking=$BUILD_GPU \
-DBUILD_gpu_surface=$BUILD_GPU \
-DBUILD_gpu_people=$BUILD_GPU
# Temporary fix to ensure no tests are skipped
cmake $(Build.SourcesDirectory)
displayName: 'CMake Configuration'
Expand Down
27 changes: 14 additions & 13 deletions .dev/docker/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
ARG USE_CUDA
ARG CUDA_VERSION="9.2"
ARG UBUNTU_DISTRO="16.04"
# Known conflicts:
# * 9.1 is an issue with 16.04 for Eigen
ARG BASE_CUDA_IMAGE=${USE_CUDA:+"nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_DISTRO}"}
ARG BASE_IMAGE=${BASE_CUDA_IMAGE:-"ubuntu:${UBUNTU_DISTRO}"}

FROM ${BASE_IMAGE}

ARG USE_CUDA

ARG VTK_VERSION=6
ENV DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -41,20 +45,17 @@ RUN apt-get update \
# Eigen patch (https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1462) to fix issue metioned
# in https://github.com/PointCloudLibrary/pcl/issues/3729 is available in Eigen 3.3.7
# Not needed from 20.04 since it is the default version from apt
RUN if [ `pkg-config --modversion eigen3 | cut -d. -f3` -lt 7 ]; then \
wget -qO- https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz | tar xz \
&& apt install -y libblas-dev \
&& cd eigen-3.3.7 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& cd ../.. \
&& rm -rf eigen-3.3.7/ \
&& rm -f eigen-3.3.7.tar.gz ; \
fi
RUN wget -qO- https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz | tar xz \
&& apt install -y libblas-dev \
&& cd eigen-3.3.7 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& cd ../.. \
&& rm -rf eigen-3.3.7/ \
&& rm -f eigen-3.3.7.tar.gz

# CUDA 9.2 supports GCC 7
RUN if [ `gcc -dumpversion | cut -d. -f1` -lt 7 ]; then add-apt-repository ppa:ubuntu-toolchain-r/test \
&& apt update \
&& apt install g++-7 -y \
Expand Down

0 comments on commit 374ef29

Please sign in to comment.