Repository navigation
Dockerfiles for TensorRT, CUDA, build from source #922
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
Merged
George Wu (jywu-mysoft)
merged 16 commits into
microsoft:master
from
vinitra-zz:docker-mcr-update
Jul 9, 2019
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3f0bf2a
dockerfile updates for BYOC scenario
vinitra 201881a
updates for 3 different build versions
vinitra 03e4e4c
updating to remove libopenblas, python3, python3-pip
vinitra 7c2ff2e
Including LICENSE-IMAGE.txt for CUDA/TensorRT dockerfiles
vinitra f04a5b2
remove unnecessary cmake files
vinitra 37cdf63
fixing comment typo
vinitra a6e70ef
optimizing dockerfile.source as per review suggestions (not working c…
vinitra eeb4318
Merge branch 'master' of https://github.com/Microsoft/onnxruntime int…
vinitra 122ca1a
Merge branch 'master' of https://github.com/Microsoft/onnxruntime int…
vinitra 17b862d
Optimizing dockerfiles with install_dependencies script
vinitra d49898d
update dockerfile with --cmake_extra_defines version number
vinitra 2153242
add &&\ for license copy lines
vinitra 0f18016
updates, adding miniconda to path, reincluded clearing the pycache
vinitra d15317f
adding maintainer note
vinitra 655baae
update readme instructions
vinitra f001dd3
update tensorrt versioning in dockerfile
vinitra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # -------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
| # -------------------------------------------------------------- | ||
| # Dockerfile to run ONNXRuntime with CUDA, CUDNN integration | ||
|
|
||
| # nVidia cuda 10.0 Base Image | ||
| FROM nvidia/cuda:10.0-cudnn7-devel | ||
| MAINTAINER Vinitra Swamy "viswamy@microsoft.com" | ||
|
|
||
| ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime | ||
| ARG ONNXRUNTIME_SERVER_BRANCH=master | ||
|
|
||
| RUN apt-get update &&\ | ||
| apt-get install -y sudo git bash | ||
|
|
||
| WORKDIR /code | ||
| ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:/opt/miniconda/bin:${PATH} | ||
|
|
||
| # Prepare onnxruntime repository & build onnxruntime with TensorRT | ||
| RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\ | ||
| /bin/sh onnxruntime/dockerfiles/install_common_deps.sh &&\ | ||
| cp onnxruntime/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt &&\ | ||
| cd onnxruntime &&\ | ||
| /bin/sh ./build.sh --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) &&\ | ||
| pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\ | ||
| cd .. &&\ | ||
| rm -rf onnxruntime cmake-3.14.3-Linux-x86_64.tar.gz cmake-3.14.3-Linux-x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # -------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
| # -------------------------------------------------------------- | ||
| # Dockerfile to run ONNXRuntime with source build for CPU | ||
|
|
||
| # Ubuntu 16.04 Base Image | ||
| FROM ubuntu:16.04 | ||
| MAINTAINER Vinitra Swamy "viswamy@microsoft.com" | ||
|
|
||
| ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime | ||
| ARG ONNXRUNTIME_SERVER_BRANCH=master | ||
|
|
||
| RUN apt-get update &&\ | ||
| apt-get install -y sudo git bash | ||
|
|
||
| WORKDIR /code | ||
| ENV PATH /opt/miniconda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:${PATH} | ||
|
|
||
| # Prepare onnxruntime repository & build onnxruntime | ||
| RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\ | ||
| /bin/sh onnxruntime/dockerfiles/install_common_deps.sh &&\ | ||
| cd onnxruntime &&\ | ||
| /bin/sh ./build.sh --config Release --build_wheel --update --build --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) &&\ | ||
| pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\ | ||
| cd .. &&\ | ||
| rm -rf onnxruntime cmake-3.14.3-Linux-x86_64.tar.gz cmake-3.14.3-Linux-x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # -------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
| # -------------------------------------------------------------- | ||
| # Dockerfile to run ONNXRuntime with TensorRT integration | ||
|
|
||
| # nVidia TensorRT Base Image | ||
| FROM nvcr.io/nvidia/tensorrt:19.02-py3 | ||
| MAINTAINER Vinitra Swamy "viswamy@microsoft.com" | ||
|
|
||
| ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime | ||
| ARG ONNXRUNTIME_SERVER_BRANCH=master | ||
|
|
||
| RUN apt-get update &&\ | ||
| apt-get install -y sudo git bash | ||
|
|
||
| WORKDIR /code | ||
| ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:/opt/miniconda/bin:${PATH} | ||
|
|
||
| # Prepare onnxruntime repository & build onnxruntime with TensorRT | ||
| RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\ | ||
| /bin/sh onnxruntime/dockerfiles/install_common_deps.sh &&\ | ||
| cp onnxruntime/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt &&\ | ||
| cd onnxruntime &&\ | ||
| /bin/sh ./build.sh --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_tensorrt --tensorrt_home /workspace/tensorrt --config Release --build_wheel --update --build --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) &&\ | ||
| pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\ | ||
| cd .. &&\ | ||
| rm -rf onnxruntime cmake-3.14.3-Linux-x86_64.tar.gz cmake-3.14.3-Linux-x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| This image is made available to you on the condition that you agree to | ||
| [your agreement][1] governing your use of Azure. | ||
| If you do not have an existing agreement governing your use of Azure, you agree that | ||
| your agreement governing use of Azure is the [Microsoft Online Subscription Agreement][2] | ||
| (which incorporates the [Online Services Terms][3]). | ||
| By using the software you agree to these terms. This software may collect data | ||
| that is transmitted to Microsoft. Please see the [Microsoft Privacy Statement][4] | ||
| to learn more about how Microsoft processes personal data. | ||
|
|
||
| This image must be used on Microsoft Azure Services only. | ||
|
|
||
| [1]: https://azure.microsoft.com/en-us/support/legal/ | ||
| [2]: https://azure.microsoft.com/en-us/support/legal/subscription-agreement/ | ||
| [3]: http://www.microsoftvolumelicensing.com/DocumentSearch.aspx?Mode=3&DocumentTypeId=46 | ||
| [4]: http://go.microsoft.com/fwlink/?LinkId=248681 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/bash | ||
| DEBIAN_FRONTEND=noninteractive | ||
| apt-get install -y --no-install-recommends \ | ||
| wget \ | ||
| zip \ | ||
| ca-certificates \ | ||
| build-essential \ | ||
| curl \ | ||
| libcurl4-openssl-dev \ | ||
| libssl-dev \ | ||
| python3-dev | ||
|
|
||
| # Dependencies: conda | ||
| wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O ~/miniconda.sh --no-check-certificate && /bin/bash ~/miniconda.sh -b -p /opt/miniconda | ||
| rm ~/miniconda.sh | ||
| /opt/miniconda/bin/conda clean -tipsy | ||
| find / -type d -name __pycache__ -prune -exec rm -rf {}; | ||
|
|
||
| conda install -y python=3.6 numpy | ||
| conda clean -aqy | ||
| rm -rf /opt/miniconda/pkgs | ||
|
|
||
| # Dependencies: cmake | ||
| sudo wget --quiet https://github.com/Kitware/CMake/releases/download/v3.14.3/cmake-3.14.3-Linux-x86_64.tar.gz | ||
| tar zxf cmake-3.14.3-Linux-x86_64.tar.gz | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.