-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Upgrade gpu build to CUDA 10 + cudnn 7.3 #112
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| jobs: | ||
| - job: Linux_CI_GPU_Dev | ||
| pool: Linux-GPU-CUDA10 | ||
| steps: | ||
| - script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d gpu -c cuda9.1-cudnn7.1 -r $(Build.BinariesDirectory)' | ||
| displayName: 'Command Line Script' | ||
| env: | ||
| AZURE_BLOB_KEY: $(onnxruntime-storage-key) | ||
|
|
||
| - script: 'sudo rm -rf $(Agent.BuildDirectory)' | ||
| displayName: 'Clean build folders/files' | ||
| condition: always() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| jobs: | ||
| - job: Windows_CI_GPU_Dev | ||
| pool: Win-GPU-CUDA10 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above. #WontFix |
||
| variables: | ||
| CUDA_VERSION: '9.1' | ||
| steps: | ||
| - task: PowerShell@1 | ||
| displayName: 'Set CUDA path' | ||
| inputs: | ||
| scriptName: 'tools/ci_build/github/windows/set_cuda_path.ps1' | ||
| arguments: '-CudaMsbuildPath C:\local\cudaMsbuildIntegration-9.1.85-windows10-x64-0 -CudaVersion $(CUDA_VERSION)' | ||
| - task: BatchScript@1 | ||
| displayName: 'Setup VS2017 env vars' | ||
| inputs: | ||
| filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat' | ||
| arguments: 'amd64 -vcvars_ver=14.11' | ||
| modifyEnvironment: true | ||
| - task: CmdLine@1 | ||
| displayName: 'Get ONNX testdata' | ||
| inputs: | ||
| filename: azcopy | ||
| arguments: ' /S /Source:https://onnxruntimetestdata.blob.core.windows.net/onnx-model-zoo-20181018 /Dest:$(Build.SourcesDirectory)\build\Windows\Debug\models /SourceKey:%AZURE_BLOB_KEY%' | ||
| env: | ||
| AZURE_BLOB_KEY: $(onnxruntime-storage-key) | ||
| - task: BatchScript@1 | ||
| inputs: | ||
| filename: build.bat | ||
| arguments: ' --use_cuda --cuda_home="C:\local\cuda-9.1.85-windows10-x64-0" --cudnn_home="C:\local\cudnn-9.1-windows10-x64-v7.1\cuda"' | ||
| workingFolder: "$(Build.SourcesDirectory)" | ||
| - task: PowerShell@1 | ||
| displayName: 'Clean up CUDA props files' | ||
| inputs: | ||
| scriptName: 'tools/ci_build/github/windows/clean_up_cuda_prop_files.ps1' | ||
| arguments: '-CudaVersion $(CUDA_VERSION)' | ||
| - task: CmdLine@1 | ||
| displayName: 'Clean build folders/files' | ||
| inputs: | ||
| filename: rd | ||
| arguments: '/s /q $(Agent.BuildDirectory)' | ||
| continueOnError: true | ||
| condition: always() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Tag: nvidia/cuda:9.1-cudnn7-devel-ubuntu16.04 | ||
| # Label: com.nvidia.cuda.version: 9.1.85 | ||
| # Label: com.nvidia.cudnn.version: 7.1.2.21 | ||
| # Ubuntu 16.04.5 | ||
| FROM nvidia/cuda@sha256:e48777124a0217001be8533123fcb8cc12ace38a4add2774b34295e611c99f10 | ||
|
|
||
| ARG PYTHON_VERSION=3.5 | ||
|
|
||
| ADD scripts /tmp/scripts | ||
| ENV PATH="/opt/cmake/bin:${PATH}" | ||
| RUN /tmp/scripts/install_ubuntu.sh -p ${PYTHON_VERSION} && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts | ||
|
|
||
| WORKDIR /root | ||
|
|
||
| # Allow configure to pick up GDK and CuDNN where it expects it. | ||
| # (Note: $CUDNN_VERSION is defined by NVidia's base image) | ||
| RUN _CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2) && \ | ||
| mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/include && \ | ||
| ln -s /usr/include/cudnn.h /usr/local/cudnn-$_CUDNN_VERSION/cuda/include/cudnn.h && \ | ||
| mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64 && \ | ||
| ln -s /etc/alternatives/libcudnn_so /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64/libcudnn.so && \ | ||
| ln -s /usr/local/cudnn{-$_CUDNN_VERSION,} | ||
|
|
||
| # Build and Install LLVM | ||
| ARG LLVM_VERSION=6.0.1 | ||
| RUN cd /tmp && \ | ||
| wget --no-verbose http://releases.llvm.org/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.xz && \ | ||
| xz -d llvm-$LLVM_VERSION.src.tar.xz && \ | ||
| tar xvf llvm-$LLVM_VERSION.src.tar && \ | ||
| cd llvm-$LLVM_VERSION.src && \ | ||
| mkdir -p build && \ | ||
| cd build && \ | ||
| cmake .. -DCMAKE_BUILD_TYPE=Release && \ | ||
| cmake --build . -- -j$(nproc) && \ | ||
| cmake -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-$LLVM_VERSION -DBUILD_TYPE=Release -P cmake_install.cmake && \ | ||
| cd /tmp && \ | ||
| rm -rf llvm* | ||
|
|
||
| ENV LD_LIBRARY_PATH /usr/local/openblas/lib:$LD_LIBRARY_PATH | ||
|
|
||
| ARG BUILD_USER=onnxruntimedev | ||
| WORKDIR /home/$BUILD_USER | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ set -e -o -x | |
|
|
||
| SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )" | ||
| SOURCE_ROOT=$(realpath $SCRIPT_DIR/../../../../) | ||
| CUDA_VER=cuda10.0-cudnn7.3 | ||
|
|
||
| while getopts c:o:d:r:p:x: parameter_Option | ||
| do case "${parameter_Option}" | ||
|
|
@@ -16,6 +17,8 @@ r) BUILD_DIR=${OPTARG};; | |
| p) PYTHON_VER=${OPTARG};; | ||
| # "--build_wheel --use_openblas" | ||
| x) BUILD_EXTR_PAR=${OPTARG};; | ||
| # "cuda10.0-cudnn7.3, cuda9.1-cudnn7.1" | ||
| c) CUDA_VER=${OPTARG};; | ||
| esac | ||
| done | ||
|
|
||
|
|
@@ -25,7 +28,7 @@ echo "bo=$BUILD_OS bd=$BUILD_DEVICE bdir=$BUILD_DIR pv=$PYTHON_VER bex=$BUILD_EX | |
|
|
||
| cd $SCRIPT_DIR/docker | ||
| if [ $BUILD_DEVICE = "gpu" ]; then | ||
| IMAGE="ubuntu16.04-cuda9.1-cudnn7.1" | ||
| IMAGE="ubuntu16.04-$CUDA_VER" | ||
| docker build -t "onnxruntime-$IMAGE" --build-arg PYTHON_VERSION=${PYTHON_VER} -f Dockerfile.ubuntu_gpu . | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
should switch the docker file as well, will fix it for cuda9.1 build #Resolved |
||
| else | ||
| IMAGE="ubuntu16.04" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.