From 891b7395dafd676e24be92ac460c64656dd0a76e Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Thu, 17 Dec 2020 17:46:54 -0800 Subject: [PATCH] refactor(//docker): Update containers for 0.2.0 Signed-off-by: Naren Dasan Signed-off-by: Naren Dasan --- docker/Dockerfile.20.06 | 8 ++++++++ docker/Dockerfile.docs | 6 +++--- docker/WORKSPACE.docker | 10 +++++----- notebooks/Dockerfile.notebook | 12 ++++++------ notebooks/WORKSPACE.notebook | 10 +++++----- 5 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 docker/Dockerfile.20.06 diff --git a/docker/Dockerfile.20.06 b/docker/Dockerfile.20.06 new file mode 100644 index 0000000000..6be8f488d5 --- /dev/null +++ b/docker/Dockerfile.20.06 @@ -0,0 +1,8 @@ +FROM nvcr.io/nvidia/pytorch:20.07-py3 + +RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \ + && curl https://bazel.build/bazel-release.pub.gpg | apt-key add - + +RUN apt-get update && apt-get install bazel-3.3.1 && rm -rf /var/lib/apt/lists/* +RUN ln -s /usr/bin/bazel-3.3.1 /usr/bin/bazel + diff --git a/docker/Dockerfile.docs b/docker/Dockerfile.docs index 30d22f7a2d..6e5dc30c5c 100644 --- a/docker/Dockerfile.docs +++ b/docker/Dockerfile.docs @@ -1,10 +1,10 @@ -FROM nvcr.io/nvidia/tensorrt:20.03-py3 +FROM nvcr.io/nvidia/tensorrt:20.10-py3 RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add - RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list -RUN apt-get update && apt-get install -y bazel-3.4.1 clang-format -RUN ln -s /usr/bin/bazel-3.4.1 /usr/bin/bazel +RUN apt-get update && apt-get install -y bazel-3.7.1 clang-format +RUN ln -s /usr/bin/bazel-3.7.1 /usr/bin/bazel # Workaround for bazel expecting both static and shared versions, we only use shared libraries inside container RUN cp /usr/lib/x86_64-linux-gnu/libnvinfer.so /usr/lib/x86_64-linux-gnu/libnvinfer_static.a diff --git a/docker/WORKSPACE.docker b/docker/WORKSPACE.docker index 25b5773226..fd9de7fe6d 100755 --- a/docker/WORKSPACE.docker +++ b/docker/WORKSPACE.docker @@ -35,7 +35,7 @@ git_repository( # CUDA should be installed on the system locally new_local_repository( name = "cuda", - path = "/usr/local/cuda-10.2/", + path = "/usr/local/cuda/", build_file = "@//third_party/cuda:BUILD", ) @@ -53,16 +53,16 @@ http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.6.0.zip"], - sha256 = "fded948bd2dbee625cee33ebbd4843a69496729389e0200a90fbb667cdaeeb69" + sha256 = "117f6dd65b7267839197397edd0b10fd2900b0f291e3e54b0b800caefc31bcb6", + urls = ["https://download.pytorch.org/libtorch/cu110/libtorch-cxx11-abi-shared-with-deps-1.7.1%2Bcu110.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", strip_prefix = "libtorch", - sha256 = "141bb229f4bbf905541096cf8705785e7b0c79e37ca1e5db9d372730b1b9abd7", - urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.6.0.zip"], + sha256 = "c77f926afd55d7e860ec9c7abc992c25be77c89771c3ec6fcc13ea42f07d46df", + urls = ["https://download.pytorch.org/libtorch/cu110/libtorch-shared-with-deps-1.7.1%2Bcu110.zip"], ) #################################################################################### diff --git a/notebooks/Dockerfile.notebook b/notebooks/Dockerfile.notebook index ae732785c3..2662c87514 100644 --- a/notebooks/Dockerfile.notebook +++ b/notebooks/Dockerfile.notebook @@ -1,14 +1,14 @@ -FROM nvcr.io/nvidia/tensorrt:20.03-py3 +FROM nvcr.io/nvidia/tensorrt:20.09-py3 RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add - RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list -RUN apt update && apt install bazel-3.4.1 -RUN ln -s /usr/bin/bazel-3.4.1 /usr/bin/bazel +RUN apt-get update && apt-get install bazel-3.7.1 +RUN ln -s /usr/bin/bazel-3.7.1 /usr/bin/bazel RUN pip install pillow==4.3.0 -RUN pip install torch==1.6.0 -RUN pip install torchvision==0.7.0 +RUN pip install torch==1.7.1 +RUN pip install torchvision==0.8.2 RUN pip install notebook COPY . /workspace/TRTorch @@ -21,7 +21,7 @@ RUN bazel build //:libtrtorch --compilation_mode opt WORKDIR /workspace/TRTorch/py # Locale is not set by default -RUN apt update && apt install -y locales && locale-gen en_US.UTF-8 +RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 diff --git a/notebooks/WORKSPACE.notebook b/notebooks/WORKSPACE.notebook index 25b5773226..fd9de7fe6d 100755 --- a/notebooks/WORKSPACE.notebook +++ b/notebooks/WORKSPACE.notebook @@ -35,7 +35,7 @@ git_repository( # CUDA should be installed on the system locally new_local_repository( name = "cuda", - path = "/usr/local/cuda-10.2/", + path = "/usr/local/cuda/", build_file = "@//third_party/cuda:BUILD", ) @@ -53,16 +53,16 @@ http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.6.0.zip"], - sha256 = "fded948bd2dbee625cee33ebbd4843a69496729389e0200a90fbb667cdaeeb69" + sha256 = "117f6dd65b7267839197397edd0b10fd2900b0f291e3e54b0b800caefc31bcb6", + urls = ["https://download.pytorch.org/libtorch/cu110/libtorch-cxx11-abi-shared-with-deps-1.7.1%2Bcu110.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", strip_prefix = "libtorch", - sha256 = "141bb229f4bbf905541096cf8705785e7b0c79e37ca1e5db9d372730b1b9abd7", - urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.6.0.zip"], + sha256 = "c77f926afd55d7e860ec9c7abc992c25be77c89771c3ec6fcc13ea42f07d46df", + urls = ["https://download.pytorch.org/libtorch/cu110/libtorch-shared-with-deps-1.7.1%2Bcu110.zip"], ) ####################################################################################