diff --git a/Jenkinsfile b/Jenkinsfile index a66c96f3396e..ceb5771d82f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,7 +145,7 @@ stage('Build') { echo set\\(USE_CUDA ON\\) >> config.cmake echo set\\(USE_OPENGL ON\\) >> config.cmake echo set\\(USE_MICRO ON\\) >> config.cmake - echo set\\(USE_LLVM llvm-config-7\\) >> config.cmake + echo set\\(USE_LLVM llvm-config-9\\) >> config.cmake echo set\\(USE_NNPACK ON\\) >> config.cmake echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake echo set\\(USE_RPC ON\\) >> config.cmake diff --git a/cmake/util/FindANTLR.cmake b/cmake/util/FindANTLR.cmake index b68f90ead131..3e490187083e 100644 --- a/cmake/util/FindANTLR.cmake +++ b/cmake/util/FindANTLR.cmake @@ -61,5 +61,5 @@ macro(find_antlr use_antlr) elseif(NOT ${use_antlr} STREQUAL "OFF") set(ANTLR4 ${JAVA_PROGRAM} -jar ${use_antlr}) endif() - message(STATUS "ANTLR4="${ANTLR4}) + message(STATUS "ANTLR4=${ANTLR4}") endmacro(find_antlr) diff --git a/docker/bash.sh b/docker/bash.sh index 401c892e1a92..0fdc47684a1a 100755 --- a/docker/bash.sh +++ b/docker/bash.sh @@ -51,18 +51,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" WORKSPACE="$(pwd)" # Use nvidia-docker if the container is GPU. -if [[ "${DOCKER_IMAGE_NAME}" == *"gpu"* ]]; then - DOCKER_BINARY="nvidia-docker" -else - DOCKER_BINARY="docker" -fi - if [[ ! -z $CUDA_VISIBLE_DEVICES ]]; then CUDA_ENV="-e CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}" else CUDA_ENV="" fi +if [[ "${DOCKER_IMAGE_NAME}" == *"gpu"* ]]; then + if ! type "nvidia-docker" > /dev/null + then + DOCKER_BINARY="docker" + CUDA_ENV=" --gpus all "${CUDA_ENV} + else + DOCKER_BINARY="nvidia-docker" + fi +else + DOCKER_BINARY="docker" +fi + # Print arguments. echo "WORKSPACE: ${WORKSPACE}" echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}"