-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fa7581
commit 557f4d0
Showing
22 changed files
with
259 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -5,3 +5,5 @@ checkpoints/ | |
datasets/ | ||
external/tensorrt-inference-server/ | ||
checkpoints/ | ||
triton/model_repo | ||
triton/deploy |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "external/tensorrt-inference-server"] | ||
path = external/tensorrt-inference-server | ||
url = https://github.com/NVIDIA/tensorrt-inference-server.git | ||
branch = r19.06 | ||
[submodule "external/triton-inference-server"] | ||
path = external/triton-inference-server | ||
url = https://github.com/NVIDIA/triton-inference-server | ||
branch = r19.12 |
95 changes: 95 additions & 0 deletions
95
PyTorch/SpeechRecognition/Jasper/external/Dockerfile.client.patched
This file contains 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,95 @@ | ||
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# * Neither the name of NVIDIA CORPORATION nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY | ||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
# Default setting is building on nvidia/cuda:10.1-devel-ubuntu18.04 | ||
ARG BASE_IMAGE=nvidia/cuda:10.1-devel-ubuntu18.04 | ||
|
||
FROM ${BASE_IMAGE} | ||
|
||
# Default to use Python3. Allowed values are "2" and "3". | ||
ARG PYVER=3 | ||
|
||
# Ensure apt-get won't prompt for selecting options | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV PYVER=$PYVER | ||
|
||
RUN PYSFX=`[ "$PYVER" != "2" ] && echo "$PYVER" || echo ""` && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
software-properties-common \ | ||
autoconf \ | ||
automake \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
libopencv-dev \ | ||
libopencv-core-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
pkg-config \ | ||
python${PYSFX} \ | ||
python${PYSFX}-pip \ | ||
python${PYSFX}-dev && \ | ||
pip${PYSFX} install --upgrade setuptools wheel | ||
|
||
RUN PYSFX=`[ "$PYVER" != "2" ] && echo "$PYVER" || echo ""` && \ | ||
pip${PYSFX} install --upgrade grpcio-tools | ||
|
||
# Build expects "python" executable (not python3). | ||
RUN rm -f /usr/bin/python && \ | ||
ln -s /usr/bin/python$PYVER /usr/bin/python | ||
|
||
# Build the client library and examples | ||
WORKDIR /workspace | ||
COPY VERSION . | ||
COPY build build | ||
COPY src/clients src/clients | ||
COPY src/core src/core | ||
|
||
RUN cd build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/workspace/install && \ | ||
make -j16 trtis-clients | ||
RUN cd install && \ | ||
export VERSION=`cat /workspace/VERSION` && \ | ||
tar zcf /workspace/v$VERSION.clients.tar.gz * | ||
|
||
# For CI testing need to install a test script. | ||
COPY qa/L0_client_tar/test.sh /tmp/test.sh | ||
|
||
# Install an image needed by the quickstart and other documentation. | ||
COPY qa/images/mug.jpg images/mug.jpg | ||
|
||
# Install the dependencies needed to run the client examples. These | ||
# are not needed for building but including them allows this image to | ||
# be used to run the client examples. The special upgrade and handling | ||
# of pip is needed to get numpy to install correctly with python2 on | ||
# ubuntu 16.04. | ||
RUN python -m pip install --user --upgrade pip && \ | ||
python -m pip install --upgrade install/python/tensorrtserver-*.whl numpy pillow | ||
|
||
ENV PATH //workspace/install/bin:${PATH} | ||
ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH} |
1 change: 1 addition & 0 deletions
1
PyTorch/SpeechRecognition/Jasper/external/triton-inference-server
Submodule triton-inference-server
added at
a1f386
This file contains 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 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 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 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 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
4 changes: 2 additions & 2 deletions
4
PyTorch/SpeechRecognition/Jasper/tensorrt/scripts/docker/build.sh
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
# Constructs a docker image containing dependencies for execution of JASPER through TRT | ||
echo "docker build . -f ./trt/Dockerfile -t jasper:trt6" | ||
docker build . -f ./trt/Dockerfile -t jasper:trt6 | ||
echo "docker build . -f ./tensorrt/Dockerfile -t jasper:trt6" | ||
docker build . -f ./tensorrt/Dockerfile -t jasper:trt6 |
This file contains 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 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 |
---|---|---|
@@ -1,22 +1,38 @@ | ||
ARG FROM_IMAGE_NAME=nvcr.io/nvidian/pytorch:20.03-py3 | ||
ARG TRITON_BASE_IMAGE=nvcr.io/nvidia/tritonserver:20.03.1-py3-clientsdk | ||
FROM ${TRITON_BASE_IMAGE} as triton | ||
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:19.09-py3 | ||
|
||
FROM tensorrtserver_client as trtis-client | ||
FROM ${FROM_IMAGE_NAME} | ||
RUN apt-get update && apt-get install -y python3 | ||
ARG version=6.0.1-1+cuda10.1 | ||
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb \ | ||
&& dpkg -i cuda-repo-*.deb \ | ||
&& wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb \ | ||
&& dpkg -i nvidia-machine-learning-repo-*.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends libnvinfer6=${version} libnvonnxparsers6=${version} libnvparsers6=${version} libnvinfer-plugin6=${version} libnvinfer-dev=${version} libnvonnxparsers-dev=${version} libnvparsers-dev=${version} libnvinfer-plugin-dev=${version} python-libnvinfer=${version} python3-libnvinfer=${version} | ||
RUN cp -r /usr/lib/python3.6/dist-packages/tensorrt /opt/conda/lib/python3.6/site-packages/tensorrt | ||
|
||
ADD requirements.txt . | ||
RUN pip install -r requirements.txt | ||
RUN pip install onnxruntime | ||
|
||
ADD triton/requirements.txt . | ||
RUN pip install -r requirements.txt | ||
ENV PATH=$PATH:/usr/src/tensorrt/bin | ||
WORKDIR /tmp/onnx-trt | ||
COPY tensorrt/onnx-trt.patch . | ||
RUN git clone https://github.com/onnx/onnx-tensorrt.git && cd onnx-tensorrt && git checkout b677b9cbf19af803fa6f76d05ce558e657e4d8b6 && git submodule update --init --recursive && \ | ||
patch -f < ../onnx-trt.patch && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DGPU_ARCHS="60 70 75" && make -j16 && make install && mv -f /usr/lib/libnvonnx* /usr/lib/x86_64-linux-gnu/ && ldconfig | ||
|
||
ADD tensorrt/requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
COPY --from=triton /opt/tritonserver/qa/pkgs/tensorrtserver-1.13.0-py3-none-linux_x86_64.whl ./tensorrtserver-1.13.0-py3-none-linux_x86_64.whl | ||
# Here's a good place to install pip reqs from JoC repo. | ||
# At the same step, also install TRT pip reqs | ||
WORKDIR /tmp/pipReqs | ||
COPY requirements.txt /tmp/pipReqs/pytRequirements.txt | ||
COPY tensorrt/requirements.txt /tmp/pipReqs/trtRequirements.txt | ||
COPY triton/requirements.txt /tmp/pipReqs/trtisRequirements.txt | ||
RUN apt-get update && apt-get install -y --no-install-recommends portaudio19-dev && pip install -r pytRequirements.txt && pip install -r trtRequirements.txt && pip install -r trtisRequirements.txt | ||
|
||
RUN pip install tensorrtserver-1.13.0-py3-none-linux_x86_64.whl | ||
#Copy the perf_client over | ||
COPY --from=trtis-client /workspace/install/bin/perf_client /workspace/install/bin/perf_client | ||
#Copy the python wheel and install with pip | ||
COPY --from=trtis-client /workspace/install/python/tensorrtserver*.whl /tmp/ | ||
RUN pip install /tmp/tensorrtserver*.whl && rm /tmp/tensorrtserver*.whl | ||
|
||
WORKDIR /workspace/jasper | ||
COPY . . | ||
RUN pip install --no-cache-dir -e . |
This file contains 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 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 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 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 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
Oops, something went wrong.