From 3d46688334a7aeb99d70967ee6158e97536e4a25 Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Tue, 1 Jun 2021 11:28:35 +0200 Subject: [PATCH] clean up of Docker images --- CHANGES.txt | 3 + ...a-image-classification-tensorrt-loadgen-py | 1 - docker/.cm/alias-u-4696e4c4f2198fc3 | 1 - docker/ck-ai/.cm/meta.json | 6 +- docker/ck-ai/Dockerfile.centos-7 | 75 ++ docker/ck-ai/Dockerfile.ubuntu-18.04 | 67 ++ docker/ck-ai/Dockerfile.ubuntu-20.04 | 126 ++- .../ck-crowdtune/Dockerfile.ubuntu-20.04-gcc | 2 +- .../Dockerfile.ubuntu-20.04-llvm-12 | 2 +- docker/ck-web-server/Dockerfile.centos-7 | 4 +- docker/ck-web-server/Dockerfile.ubuntu-18.04 | 2 +- docker/ck-web-server/Dockerfile.ubuntu-20.04 | 2 +- docker/ck/Dockerfile.centos-7 | 2 +- docker/ck/Dockerfile.ubuntu-18.04 | 2 +- docker/ck/Dockerfile.ubuntu-20.04 | 2 +- .../Dockerfile.ubuntu-18.04 | 14 +- .../.cm/desc.json | 1 - .../.cm/info.json | 15 - .../.cm/meta.json | 18 - .../Dockerfile.tensorrt-6-19.12-py3 | 138 ---- .../README.md | 724 ------------------ .../env.list | 8 - .../explore.sh | 230 ------ .../Dockerfile.debian-9 | 4 +- .../Dockerfile.debian-9 | 4 +- .../Dockerfile.ubuntu-18.04 | 4 +- .../Dockerfile.ubuntu-18.04-dashboard | 5 +- .../Dockerfile.amazonlinux | 6 +- .../Dockerfile.amazonlinux.glow | 3 + .../Dockerfile.amazonlinux.glow.min | 3 + .../Dockerfile.amazonlinux.min | 6 +- .../Dockerfile.centos-7 | 6 +- .../Dockerfile.centos-8 | 6 +- .../Dockerfile.centos-8.python3.7 | 6 +- .../Dockerfile.debian-10 | 6 +- .../Dockerfile.debian-9 | 6 +- .../Dockerfile.ubuntu-16.04 | 6 +- .../Dockerfile.ubuntu-18.04 | 6 +- .../Dockerfile.ubuntu-20.04 | 4 +- .../Dockerfile.ubuntu-20.04.min | 4 +- .../Dockerfile.ubuntu-20.04 | 17 +- .../Dockerfile.ubuntu-20.04 | 18 +- .../.cm/meta.json | 1 - .../Dockerfile.tensorrt-7-20.03-py3-tf-2.1.0 | 44 +- .../Dockerfile.ubuntu-18.04-tf-1.15.2-mkl-py3 | 6 +- .../Dockerfile.ubuntu-18.04-tf-2.0.1-mkl-py3 | 6 +- .../Dockerfile.ubuntu-18.04-tf-2.1.0-mkl-py3 | 6 +- .../Dockerfile.ubuntu-18.04 | 14 +- .../.cm/meta.json | 1 - .../Dockerfile.tensorrt-7-20.03-py3 | 43 +- .../Dockerfile.debian-9 | 4 +- .../Dockerfile.debian-9 | 4 +- 52 files changed, 340 insertions(+), 1354 deletions(-) delete mode 100644 docker/.cm/alias-a-image-classification-tensorrt-loadgen-py delete mode 100644 docker/.cm/alias-u-4696e4c4f2198fc3 create mode 100644 docker/ck-ai/Dockerfile.centos-7 create mode 100644 docker/ck-ai/Dockerfile.ubuntu-18.04 delete mode 100644 docker/image-classification-tensorrt-loadgen-py/.cm/desc.json delete mode 100644 docker/image-classification-tensorrt-loadgen-py/.cm/info.json delete mode 100644 docker/image-classification-tensorrt-loadgen-py/.cm/meta.json delete mode 100644 docker/image-classification-tensorrt-loadgen-py/Dockerfile.tensorrt-6-19.12-py3 delete mode 100644 docker/image-classification-tensorrt-loadgen-py/README.md delete mode 100644 docker/image-classification-tensorrt-loadgen-py/env.list delete mode 100644 docker/image-classification-tensorrt-loadgen-py/explore.sh diff --git a/CHANGES.txt b/CHANGES.txt index 08c924b7..66092037 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +20210601: + * major clean up of testing of all Docker images + 20210521: * regular update of stable components diff --git a/docker/.cm/alias-a-image-classification-tensorrt-loadgen-py b/docker/.cm/alias-a-image-classification-tensorrt-loadgen-py deleted file mode 100644 index eb0b8bad..00000000 --- a/docker/.cm/alias-a-image-classification-tensorrt-loadgen-py +++ /dev/null @@ -1 +0,0 @@ -4696e4c4f2198fc3 diff --git a/docker/.cm/alias-u-4696e4c4f2198fc3 b/docker/.cm/alias-u-4696e4c4f2198fc3 deleted file mode 100644 index b8eff06b..00000000 --- a/docker/.cm/alias-u-4696e4c4f2198fc3 +++ /dev/null @@ -1 +0,0 @@ -image-classification-tensorrt-loadgen-py diff --git a/docker/ck-ai/.cm/meta.json b/docker/ck-ai/.cm/meta.json index dcec5f65..60f0c0fa 100644 --- a/docker/ck-ai/.cm/meta.json +++ b/docker/ck-ai/.cm/meta.json @@ -14,7 +14,9 @@ } }, "docker_tags": [ - "ubuntu-20.04" + "ubuntu-20.04", + "ubuntu-18.04", + "centos-7" ], "tags": [ "adaptive-container", @@ -23,7 +25,7 @@ "tested": [ { "email": "grigori@octoml.ai", - "iso_datetime": "2021-05-26T09:46:25.175776", + "iso_datetime": "2021-05-26T09:46:49.839336", "name": "Grigori Fursin" } ] diff --git a/docker/ck-ai/Dockerfile.centos-7 b/docker/ck-ai/Dockerfile.centos-7 new file mode 100644 index 00000000..8278c9f6 --- /dev/null +++ b/docker/ck-ai/Dockerfile.centos-7 @@ -0,0 +1,75 @@ +# Adaptive container with the CK interface +# Concept: https://arxiv.org/abs/2011.01149 + +FROM centos:7 + +# Contact +LABEL maintainer="Grigori Fursin " + +# Shell info +SHELL ["/bin/bash", "-c"] +ENTRYPOINT ["/bin/bash", "-c"] + +# Set noninteractive mode for apt (do not use ENV) +ARG DEBIAN_FRONTEND=noninteractive + +# Notes: https://runnable.com/blog/9-common-dockerfile-mistakes +# Install system dependencies with gcc-9 (gcc-8 doesn't compile loadgen) +RUN yum update -y && \ + yum install -y centos-release-scl && \ + yum install -y devtoolset-9 \ + yum install -y git wget zip bzip2 libz-dev libbz2-dev cmake curl unzip \ + openssh-client vim mc tree \ + gcc gcc-c++ autoconf autogen libtool make \ + libffi-devel \ + python3 python3-pip python3-devel \ + sudo dnf + +# Unavailable?: +# libc6-dev libssl-dev libbz2-dev \ + +# Prepare a user with a user group with a random id +RUN groupadd -g 1111 ckuser +RUN useradd -u 2222 -g ckuser --create-home --shell /bin/bash ckuser +RUN echo "ckuser:ckuser" | chpasswd +RUN echo "ckuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +# Set user +USER ckuser:ckuser +WORKDIR /home/ckuser +ENV PATH="/home/ckuser/.local/bin:${PATH}" +RUN mkdir .ssh + +RUN python3 --version + +# Set the CK web service defaults. +ENV CK_PORT=3344 \ + WFE_PORT=3344 + +EXPOSE ${CK_PORT} + +# Switch to gcc-9 for a user +#RUN source /opt/rh/devtoolset-9/enable +ENV PATH=/opt/rh/devtoolset-9/root/bin:$PATH +RUN gcc --version +RUN g++ --version + +# Install CK +RUN export DUMMY_CK=A +RUN ${DUMMY_CK} python3 -m pip install ck --user +RUN ${DUMMY_CK} python3 -m pip install wheel --user + +# Clone ai repo +RUN ck pull repo:ai + +# Install packages to CK env entries +RUN ck setup kernel --var.install_to_env=yes + +RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy +RUN ck detect soft:compiler.python --full_path=/usr/bin/python3 +RUN ck detect soft:compiler.gcc --full_path=`which gcc` + +# Install CK packages (CK automation 271a9004c9799191) + +# Start bash +CMD bash diff --git a/docker/ck-ai/Dockerfile.ubuntu-18.04 b/docker/ck-ai/Dockerfile.ubuntu-18.04 new file mode 100644 index 00000000..574c50bd --- /dev/null +++ b/docker/ck-ai/Dockerfile.ubuntu-18.04 @@ -0,0 +1,67 @@ +# Adaptive container with the CK interface +# Concept: https://arxiv.org/abs/2011.01149 + +# (CK automation 6ab9df569d0d1e6b) +FROM ubuntu:18.04 + +LABEL maintainer="Grigori Fursin " + +SHELL ["/bin/bash", "-c"] +ENTRYPOINT ["/bin/bash", "-c"] + +ARG DEBIAN_FRONTEND=noninteractive + +# (CK automation ee47d84311b9373d) +# Notes: https://runnable.com/blog/9-common-dockerfile-mistakes +# Install system dependencies +RUN apt update && \ + apt install -y --no-install-recommends \ + apt-utils \ + git wget zip bzip2 libz-dev libbz2-dev cmake curl unzip \ + openssh-client vim mc tree \ + gcc g++ autoconf autogen libtool make libc6-dev \ + libssl-dev libbz2-dev libffi-dev \ + python3 python3-pip python3-dev \ + sudo + +# Prepare a user with a user group with a random id (CK automation 7b3ec2b6534f3394) +RUN groupadd -g 1111 ckuser +RUN useradd -u 2222 -g ckuser --create-home --shell /bin/bash ckuser +RUN echo "ckuser:ckuser" | chpasswd +RUN adduser ckuser sudo +RUN echo "ckuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +# Set user (CK automation 8b8944a9b2c1f341) +USER ckuser:ckuser +WORKDIR /home/ckuser +ENV PATH="/home/ckuser/.local/bin:${PATH}" +RUN mkdir .ssh + +# Set the CK web service defaults. +ENV CK_PORT=3344 \ + WFE_PORT=3344 + +EXPOSE ${CK_PORT} + +# Install CK (CK automation f49f20744aba90e2) +# We need to install new pip and setuptools otherwise there is a conflict +# with the local CK installation of Python packages ... +RUN export DUMMY_CK=B +RUN ${DUMMY_CK} python3 -m pip install --ignore-installed pip setuptools wheel --user +RUN ${DUMMY_CK} python3 -m pip install virtualenv --user +RUN ${DUMMY_CK} python3 -m pip install ck --user + +# Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) +RUN ck pull repo:ai + +# Configure CK (CK automation ddea4415c4133ef9) +RUN ck setup kernel --var.install_to_env=yes + +RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy +RUN ck detect soft:compiler.python --full_path=/usr/bin/python3 +RUN ck detect soft:compiler.gcc --full_path=`which gcc` + +# Install CK packages (CK automation 271a9004c9799191) + +# Start bash +CMD bash diff --git a/docker/ck-ai/Dockerfile.ubuntu-20.04 b/docker/ck-ai/Dockerfile.ubuntu-20.04 index 0af9839a..8d87c54a 100644 --- a/docker/ck-ai/Dockerfile.ubuntu-20.04 +++ b/docker/ck-ai/Dockerfile.ubuntu-20.04 @@ -1,97 +1,65 @@ -FROM ubuntu:20.04 +# Adaptive container with the CK interface +# Concept: https://arxiv.org/abs/2011.01149 -LABEL maintainer="Grigori Fursin " +# (CK automation 6ab9df569d0d1e6b) +FROM ubuntu:20.04 -# Based on docker:mlperf-inference-v0.7.openvino +LABEL maintainer="Grigori Fursin " -# Use the Bash shell. SHELL ["/bin/bash", "-c"] - -# Allow stepping into the Bash shell interactively. ENTRYPOINT ["/bin/bash", "-c"] -# Install known system dependencies and immediately clean up to make the image smaller. -# CK needs: git, wget, zip. -# cv2 needs: libgthread-2.0. -# Python 3.7 needs: libssl, libbz2, libffi. -ENV DEBIAN_FRONTEND=noninteractive -RUN apt update -y\ - && apt install -y apt-utils\ - && apt upgrade -y\ - && apt install -y\ - python3-all \ - python3-pip \ - libglib2.0-0 libsm6\ - git wget bzip2 zip libz-dev\ - cmake\ - libgtk2.0-dev\ - libssl-dev libbz2-dev libffi-dev\ - mc\ - vim tree\ - && apt clean - -## Install Python 3.7 (needed to install TensorFlow 1.15.2 via pip). -#RUN cd /tmp \ -# && wget https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz \ -# && tar xvf Python-3.7.8.tgz \ -# && cd Python-3.7.8 \ -# && ./configure --enable-optimizations --enable-shared --with-ensurepip=install \ -# && make -j20 \ -# && make altinstall \ -# && rm -rf /tmp/* - -# Create a non-root user with a fixed group id 1500 and a fixed user id 2000 -# (hopefully distinct from any host user id for security reasons). -# See the README for the gory details. -RUN groupadd -g 1500 ckg -RUN useradd -u 2000 -g ckg --create-home --shell /bin/bash ck -USER ck:ckg -WORKDIR /home/ck +ARG DEBIAN_FRONTEND=noninteractive + +# (CK automation ee47d84311b9373d) +# Notes: https://runnable.com/blog/9-common-dockerfile-mistakes +# Install system dependencies +RUN apt update && \ + apt install -y --no-install-recommends \ + apt-utils \ + git wget zip bzip2 libz-dev libbz2-dev cmake curl unzip \ + openssh-client vim mc tree \ + gcc g++ autoconf autogen libtool make libc6-dev \ + libssl-dev libbz2-dev libffi-dev \ + python3 python3-pip python3-dev \ + sudo + +# Prepare a user with a user group with a random id (CK automation 7b3ec2b6534f3394) +RUN groupadd -g 1111 ckuser +RUN useradd -u 2222 -g ckuser --create-home --shell /bin/bash ckuser +RUN echo "ckuser:ckuser" | chpasswd +RUN adduser ckuser sudo +RUN echo "ckuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +# Set user (CK automation 8b8944a9b2c1f341) +USER ckuser:ckuser +WORKDIR /home/ckuser +ENV PATH="/home/ckuser/.local/bin:${PATH}" +RUN mkdir .ssh -# Install Collective Knowledge (CK). Make it group-executable. -ENV CK_ROOT=/home/ck/CK \ - CK_REPOS=/home/ck/CK_REPOS \ - CK_TOOLS=/home/ck/CK_TOOLS \ - PATH=${CK_ROOT}/bin:/home/ck/.local/bin:${PATH} \ - LD_LIBRARY_PATH=/usr/local/lib \ - CK_CC=gcc \ - CK_PYTHON=python3.8 \ - GIT_USER="ctuning" \ - GIT_EMAIL="admin@ctuning.org" \ - LANG=C.UTF-8 +# Set the CK web service defaults. +ENV CK_PORT=3344 \ + WFE_PORT=3344 -RUN mkdir -p ${CK_ROOT} ${CK_REPOS} ${CK_TOOLS} +EXPOSE ${CK_PORT} # Install CK (CK automation f49f20744aba90e2) -# We need to install new pip and setuptools otherwise there is a conflict -# with the local CK installation of Python packages ... -RUN export DUMMY_CK=A -RUN ${CK_PYTHON} --version -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install --ignore-installed pip setuptools wheel --user -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install pyyaml virtualenv --user -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user +RUN export DUMMY_CK=B +RUN ${DUMMY_CK} python3 -m pip install setuptools +RUN ${DUMMY_CK} python3 -m pip install virtualenv +RUN ${DUMMY_CK} python3 -m pip install ck -# Pull CK AI repository +# Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) RUN ck pull repo:ai -# Use generic Linux settings with dummy frequency setting scripts. -RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy - -# Detect C/C++ compiler (gcc). -RUN ck detect soft:compiler.gcc --full_path=`which ${CK_CC}` - -# Detect CMake build tool. -RUN ck detect soft --tags=cmake --full_path=`which cmake` +# Configure CK (CK automation ddea4415c4133ef9) +RUN ck setup kernel --var.install_to_env=yes -# Detect Python. -RUN ck detect soft --tags=compiler,python --full_path=`which ${CK_PYTHON}` - -# Set the CK web service defaults. -ENV CK_PORT=3344 \ - WFE_PORT=3344 +RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy +RUN ck detect soft:compiler.python --full_path=/usr/bin/python3 +RUN ck detect soft:compiler.gcc --full_path=`which gcc` -# Expose CK port -EXPOSE ${CK_PORT} +# Install CK packages (CK automation 271a9004c9799191) # Start bash CMD bash diff --git a/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-gcc b/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-gcc index d3925b31..ee9f7379 100644 --- a/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-gcc +++ b/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-gcc @@ -50,7 +50,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv RUN ${DUMMY_CK} python3 -m pip install ck # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-llvm-12 b/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-llvm-12 index 08fb8e04..9e925a94 100644 --- a/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-llvm-12 +++ b/docker/ck-crowdtune/Dockerfile.ubuntu-20.04-llvm-12 @@ -51,7 +51,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv RUN ${DUMMY_CK} python3 -m pip install ck # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck-web-server/Dockerfile.centos-7 b/docker/ck-web-server/Dockerfile.centos-7 index 2a32bde7..08dc5052 100644 --- a/docker/ck-web-server/Dockerfile.centos-7 +++ b/docker/ck-web-server/Dockerfile.centos-7 @@ -59,8 +59,8 @@ RUN export DUMMY_CK=A RUN ${DUMMY_CK} python3 -m pip install ck --user RUN ${DUMMY_CK} python3 -m pip install wheel --user -# Clone ck-ml repo -RUN ck pull repo:ck-ml +# Clone ai repo +RUN ck pull repo:ai # Install packages to CK env entries RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck-web-server/Dockerfile.ubuntu-18.04 b/docker/ck-web-server/Dockerfile.ubuntu-18.04 index 734c0b55..eccbea3e 100644 --- a/docker/ck-web-server/Dockerfile.ubuntu-18.04 +++ b/docker/ck-web-server/Dockerfile.ubuntu-18.04 @@ -52,7 +52,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv --user RUN ${DUMMY_CK} python3 -m pip install ck --user # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck-web-server/Dockerfile.ubuntu-20.04 b/docker/ck-web-server/Dockerfile.ubuntu-20.04 index 4a698d85..5b1b2ca7 100644 --- a/docker/ck-web-server/Dockerfile.ubuntu-20.04 +++ b/docker/ck-web-server/Dockerfile.ubuntu-20.04 @@ -50,7 +50,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv RUN ${DUMMY_CK} python3 -m pip install ck # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck/Dockerfile.centos-7 b/docker/ck/Dockerfile.centos-7 index 430bdb73..8276e2bc 100644 --- a/docker/ck/Dockerfile.centos-7 +++ b/docker/ck/Dockerfile.centos-7 @@ -60,7 +60,7 @@ RUN ${DUMMY_CK} python3 -m pip install ck --user RUN ${DUMMY_CK} python3 -m pip install wheel --user # Clone ck-ml repo -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Install packages to CK env entries RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck/Dockerfile.ubuntu-18.04 b/docker/ck/Dockerfile.ubuntu-18.04 index 03dda9e8..574c50bd 100644 --- a/docker/ck/Dockerfile.ubuntu-18.04 +++ b/docker/ck/Dockerfile.ubuntu-18.04 @@ -52,7 +52,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv --user RUN ${DUMMY_CK} python3 -m pip install ck --user # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/ck/Dockerfile.ubuntu-20.04 b/docker/ck/Dockerfile.ubuntu-20.04 index 19ed5321..8d87c54a 100644 --- a/docker/ck/Dockerfile.ubuntu-20.04 +++ b/docker/ck/Dockerfile.ubuntu-20.04 @@ -50,7 +50,7 @@ RUN ${DUMMY_CK} python3 -m pip install virtualenv RUN ${DUMMY_CK} python3 -m pip install ck # Clone CK repo(s) or pull them from Zenodo (CK automation f49f20744aba90e2) -RUN ck pull repo:ck-ml +RUN ck pull repo:ai # Configure CK (CK automation ddea4415c4133ef9) RUN ck setup kernel --var.install_to_env=yes diff --git a/docker/image-classification-openvino/Dockerfile.ubuntu-18.04 b/docker/image-classification-openvino/Dockerfile.ubuntu-18.04 index 6e5460ed..06fe0d8e 100644 --- a/docker/image-classification-openvino/Dockerfile.ubuntu-18.04 +++ b/docker/image-classification-openvino/Dockerfile.ubuntu-18.04 @@ -2,7 +2,7 @@ FROM ubuntu:18.04 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -59,8 +59,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy @@ -107,7 +107,7 @@ RUN ck install package --tags=lib,loadgen,static #-----------------------------------------------------------------------------# RUN ck install package --tags=lib,intel,open-model-zoo,2019_R3 RUN ck install package --tags=lib,openvino,2019_R3 -RUN ck compile ck-ml:program:mlperf-inference-v0.5 +RUN ck compile ai:program:mlperf-inference-v0.5 #-----------------------------------------------------------------------------# @@ -162,7 +162,7 @@ RUN ck install package --tags=model,openvino,mobilenet # Step 9. Make final preparations to run the OpenVINO program. #-----------------------------------------------------------------------------# # Allow the program create tmp files when running under an external user. -RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` +RUN chmod -R g+rwx `ck find ai:program:mlperf-inference-v0.5` #-----------------------------------------------------------------------------# @@ -173,8 +173,8 @@ RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` # using all (virtual) CPU cores. #-----------------------------------------------------------------------------# CMD ["export NPROCS=`grep -c processor /proc/cpuinfo` \ - && ck run ck-ml:program:mlperf-inference-v0.5 --skip_print_timers \ + && ck run ai:program:mlperf-inference-v0.5 --skip_print_timers \ --cmd_key=image-classification --env.CK_OPENVINO_MODEL_NAME=resnet50 \ --env.CK_LOADGEN_SCENARIO=Offline --env.CK_LOADGEN_MODE=Accuracy --env.CK_LOADGEN_DATASET_SIZE=500 \ --env.CK_OPENVINO_NTHREADS=$NPROCS --env.CK_OPENVINO_NSTREAMS=$NPROCS --env.CK_OPENVINO_NIREQ=$NPROCS \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/mlperf-inference-v0.5/tmp/accuracy.txt"] + && cat /home/dvdt/CK_REPOS/ai/program/mlperf-inference-v0.5/tmp/accuracy.txt"] diff --git a/docker/image-classification-tensorrt-loadgen-py/.cm/desc.json b/docker/image-classification-tensorrt-loadgen-py/.cm/desc.json deleted file mode 100644 index 0967ef42..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/.cm/desc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/docker/image-classification-tensorrt-loadgen-py/.cm/info.json b/docker/image-classification-tensorrt-loadgen-py/.cm/info.json deleted file mode 100644 index c30e0ddb..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/.cm/info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "backup_data_uid": "4696e4c4f2198fc3", - "backup_module_uid": "88eef0cd8c43b68a", - "backup_module_uoa": "docker", - "control": { - "engine": "CK", - "iso_datetime": "2021-05-29T18:46:04.437128", - "version": [ - "2", - "5", - "1" - ] - }, - "data_name": "image-classification-tensorrt-loadgen-py" -} diff --git a/docker/image-classification-tensorrt-loadgen-py/.cm/meta.json b/docker/image-classification-tensorrt-loadgen-py/.cm/meta.json deleted file mode 100644 index c3978df2..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/.cm/meta.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "cmd": { - "default": { - "build": "-f $#CK_PATH#$/Dockerfile$#CK_TAG_DOT#$ -t $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$$#CK_TAG_COLON#$ $#CK_PATH#$", - "push": "$#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$$#CK_TAG_COLON#$", - "run": "--runtime=nvidia --rm -it $#CK_DOCKER_ORGANIZATION#$/$#CK_DOCKER_NAME#$$#CK_TAG_COLON#$" - } - }, - "docker_tags": [ - "tensorrt-6-19.12-py3" - ], - "outdated": "yes", - "tags": [ - "adaptive-container", - "ck", - "mlperf" - ] -} diff --git a/docker/image-classification-tensorrt-loadgen-py/Dockerfile.tensorrt-6-19.12-py3 b/docker/image-classification-tensorrt-loadgen-py/Dockerfile.tensorrt-6-19.12-py3 deleted file mode 100644 index acfad11f..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/Dockerfile.tensorrt-6-19.12-py3 +++ /dev/null @@ -1,138 +0,0 @@ -# 19.12-py3 is the last image to come with TensorRT 6. -# 20.01-py3 comes with TensorRT 7. -FROM nvcr.io/nvidia/tensorrt:19.12-py3 - -# News: -# * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo -# However, it currently fails with CUDA run-time error -LABEL maintainer="Grigori Fursin " -LABEL maintainer="Anton Lokhmotov " - -# Use the Bash shell. -SHELL ["/bin/bash", "-c"] - -# Allow stepping into the Bash shell interactively. -ENTRYPOINT ["/bin/bash", "-c"] - -# Install known system dependencies and immediately clean up to make the image smaller. -# CK needs: git, wget, zip. -# TF needs: curl. -# TF Object Detection API needs ProtoBuf 3.0 which needs CMake. -RUN apt update -y\ - && apt install -y apt-utils\ - && apt upgrade -y\ - && apt install -y\ - git wget zip libz-dev\ - curl\ - cmake\ - python3 python3-pip\ - vim\ - && apt clean - -# Create a non-root user with a fixed group id 1500 and a fixed user id 2000 -# (hopefully distinct from any host user id for security reasons). -# See the README for the gory details. -RUN groupadd -g 1500 dvdtg -RUN useradd -u 2000 -g dvdtg --create-home --shell /bin/bash dvdt -USER dvdt:dvdtg -WORKDIR /home/dvdt - -# Install Collective Knowledge (CK). Make it group-executable. -ENV CK_REPOS=/home/dvdt/CK_REPOS \ - CK_TOOLS=/home/dvdt/CK_TOOLS \ - PATH=/home/dvdt/.local/bin:${PATH} \ - CK_CC=gcc \ - CK_PYTHON=python3.6 \ - LANG=C.UTF-8 - -RUN mkdir -p ${CK_REPOS} ${CK_TOOLS} - -# Install CK (CK automation f49f20744aba90e2) -# We need to install new pip and setuptools otherwise there is a conflict -# with the local CK installation of Python packages ... -RUN export DUMMY_CK=A -RUN ${CK_PYTHON} --version -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install --ignore-installed pip setuptools wheel --user -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install pyyaml virtualenv --user -RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user - -# Explicitly create a CK experiment entry, a folder that will be mounted -# (with '--volume=:/home/dvdt/CK_REPOS/local/experiment'). -# as a shared volume between the host and the container, and make it group-writable. -# For consistency, use the "canonical" uid from ck-analytics:module:experiment. -RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ - && chmod -R g+w ${CK_REPOS}/local/experiment - -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml - -# Use generic Linux settings with dummy frequency setting scripts. -RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy - -#-----------------------------------------------------------------------------# -# Step 1. Install Python packages. -#-----------------------------------------------------------------------------# -# Detect Python. -RUN ck detect soft:compiler.python --full_path=`which ${CK_PYTHON}` -# Install the latest Python package installer (pip) and some dependencies. -RUN ${CK_PYTHON} -m pip install --ignore-installed pip setuptools --user -RUN ck install package --tags=python-package,cython -RUN ck install package --tags=python-package,numpy -RUN ck install package --tags=python-package,absl -RUN ck install package --tags=python-package,opencv-python-headless - -#-----------------------------------------------------------------------------# -# Step 2. Detect GCC, CUDA and install PyCUDA. -#-----------------------------------------------------------------------------# -RUN ck detect soft:compiler.gcc --full_path=`which ${CK_CC}` -RUN ck detect soft:compiler.cuda --full_path=/usr/local/cuda/bin/nvcc -RUN ck install package --tags=python-package,pycuda - -#-----------------------------------------------------------------------------# -# Step 3. Detect TensorRT and PyTensorRT. -#-----------------------------------------------------------------------------# -RUN ck detect soft:lib.tensorrt --full_path=/usr/lib/x86_64-linux-gnu/libnvinfer.so -RUN ck detect soft:lib.python.tensorrt --full_path=/usr/lib/python3.6/dist-packages/tensorrt/__init__.py - -#-----------------------------------------------------------------------------# -# Step 4. Download and preprocess the first 500 images of the ImageNet 2012 -# validation dataset. -#-----------------------------------------------------------------------------# -RUN ck install package --tags=dataset,imagenet,aux,from.berkeley -RUN ck install package --tags=dataset,imagenet,val,original,min --no_tags=resized -#RUN ck install package --tags=dataset,imagenet,val,full,preprocessed,using-opencv -RUN ck install package --tags=dataset,imagenet,val,preprocessed,using-opencv - -#-----------------------------------------------------------------------------# -# Step 5. Install MLPerf Inference packages. -#-----------------------------------------------------------------------------# -RUN ck install package --tags=mlperf,inference,source,upstream.master -RUN ck install package --tags=mlperf,loadgen,python-package - -#-----------------------------------------------------------------------------# -# Step 6. Make final preparations to run Image Classification with TensorRT. -#-----------------------------------------------------------------------------# -# Install the official MLPerf ResNet ONNX model. -RUN ck install package --tags=model,onnx,resnet,downloaded,from.pb -# Allow to create new environments when running under an external user. -RUN chmod -R g+rwx $CK_REPOS/local/env -# Allow a few programs to create tmp files when running under an external user. -RUN chmod -R g+rwx `ck find program:image-classification-tensorrt-loadgen-py` -#RUN chmod -R g+rwx `ck find program:dump-repo-to-submission` -#RUN chmod -R g+rwx `ck find program:dump-submissions-to-dashboard` -## Need pandas and ipython for dumping submissions. -#RUN ${CK_PYTHON} -m pip install pandas --user -#RUN ${CK_PYTHON} -m pip install ipython --user - -## Print CUDA device info. -#RUN ck compile program:tool-print-cuda-devices -#CMD [ "ck run program:tool-print-cuda-devices" ] - -CMD [ "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ ---env.CK_LOADGEN_CONF_FILE=`ck find program:image-classification-tensorrt-loadgen-py`/user.conf \ ---env.CK_LOADGEN_MODE=AccuracyOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ ---env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=500 \ ---env.CK_LOADGEN_MULTISTREAMNESS=32 --env.CK_BATCH_SIZE=32 \ ---dep_add_tags.weights=model,resnet,converted-from-onnx,fp32,maxbatch.32 \ -&& head -n 12 `ck find program:image-classification-tensorrt-loadgen-py`/tmp/mlperf_log_summary.txt" ] diff --git a/docker/image-classification-tensorrt-loadgen-py/README.md b/docker/image-classification-tensorrt-loadgen-py/README.md deleted file mode 100644 index 191ead72..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/README.md +++ /dev/null @@ -1,724 +0,0 @@ -# News -* **20210529: [Grigori Fursin](https://cKnowledge.io/@gfursin) converted this container to support the latest CK version! - However, the MLPerf workflow fails with a run-time CUDA error. We decided to archive it. - See [octoml@mlops repo](https://github.com/octoml/mlops) and [MLPerf automation docs](https://github.com/ctuning/ck/blob/master/docs/mlperf-automation/README.md) for more details.** - - -# MLPerf Inference - Image Classification - NVIDIA TensorRT - -[This image]() is based on -[the TensorRT 19.12 image](https://docs.nvidia.com/deeplearning/sdk/tensorrt-container-release-notes/rel_19-12.html) from NVIDIA -(which is in turn based on Ubuntu 18.04) with [CUDA](https://developer.nvidia.com/cuda-zone) 10.2 and [TensorRT](https://developer.nvidia.com/tensorrt) 6.0.1. - -1. [Set up](#setup) - - [Set up NVIDIA Docker](#setup_nvidia) - - [Set up Collective Knowledge](#setup_ck) - - [Download](#image_download) and/or [Build](#image_build) images -1. [Use](#use) - - [Run once](#run) - - [Benchmark](#benchmark) - - [Docker parameters](#parameters_docker) - - [LoadGen parameters](#parameters_loadgen) - - [Explore](#explore) -1. [Prepare for analysis](#analyze) - - [On any machine](#analyze_any) - - [Using the same Docker image](#analyze_docker) -1. [Visualize](#visualize) - - -# Set up - - -## Set up NVIDIA Docker - -As our GPU image is based on [nvidia-docker](https://github.com/NVIDIA/nvidia-docker), please follow instructions there to set up your system. - -Note that you may need to run commands below with `sudo`, unless you [manage Docker as a non-root user](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user). - - -## Set up Collective Knowledge - -You will need to install [Collective Knowledge](http://cknowledge.org) to build images and save benchmarking results. -Please follow the [CK installation instructions](https://github.com/ctuning/ck#installation) and then pull this CK-ML repository: -```bash -$ ck pull repo:ck-ml -``` - -To refresh all CK repositories after any updates (e.g. bug fixes), run: -```bash -$ ck pull all -``` -**NB:** This only updates CK repositories on the host system. To update the Docker image, [rebuild](#build) it using the `--no-cache` flag. - -### Set up environment variables - -Set up the variable to this Docker image name: -```bash -$ export CK_IMAGE=image-classification-tensorrt-loadgen-py -``` - -Set up the variable that points to the directory that contains your CK repositories (usually `~/CK` or `~/CK_REPOS`): -```bash -$ export CK_REPOS=${HOME}/CK -``` - - -## Build - -To build an image on your system, run: -```bash -$ ck build docker:image-classification-tensorrt-loadgen-py --tag=tensorrt-6-19.12-py3 -``` - - -# Use - - -## Run inference once - -Once you have downloaded or built an image, you can run inference in the accuracy or performance mode as follows. - -### Accuracy mode - -#### ResNet, fp32, 32 samples per batch - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list \ - --rm ctuning/image-classification-tensorrt-loadgen-py:tensorrt-6-19.12-py3 \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=AccuracyOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=32 --env.CK_BATCH_SIZE=32 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=500 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-from-onnx,fp32,maxbatch.32 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... -accuracy=75.200%, good=376, total=500 -... --------------------------------------------------------------------------------- -mlperf_log_summary.txt --------------------------------------------------------------------------------- - -No warnings encountered during test. - -No errors encountered during test. -``` - -Here, we run inference on 500 images using a TensorRT plan converted on-the-fly -from the reference ResNet ONNX model. We use 32 samples per batch, the maximum -batch size supported by the model. - -**NB:** This is equivalent to the default run command: -```bash -$ docker run --rm ctuning/$CK_IMAGE -``` - -#### ResNet, int8, 15 samples per batch - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list --rm ctuning/${CK_IMAGE} \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=AccuracyOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=15 --env.CK_BATCH_SIZE=15 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=500 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-by.nvidia,for.gtx1080,int8 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... -accuracy=74.000%, good=370, total=500 -... --------------------------------------------------------------------------------- -mlperf_log_summary.txt --------------------------------------------------------------------------------- - -No warnings encountered during test. - -No errors encountered during test. -``` - -#### MobileNet, int8 - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list --rm ctuning/${CK_IMAGE} \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=AccuracyOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=250 --env.CK_BATCH_SIZE=250 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=500 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,mobilenet,converted-by.nvidia,for.gtx1080,int8 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... -accuracy=69.000%, good=345, total=500 -... --------------------------------------------------------------------------------- -mlperf_log_summary.txt --------------------------------------------------------------------------------- - -No warnings encountered during test. - -No errors encountered during test. -``` - -### Performance mode - -#### ResNet, fp32 - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list --rm ctuning/${CK_IMAGE} \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=PerformanceOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=32 --env.CK_BATCH_SIZE=32 \ - --env.CK_LOADGEN_COUNT_OVERRIDE=1440 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=1024 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-from-onnx,fp32,maxbatch.32 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... --------------------------------------------------------------------- -| LATENCIES (in milliseconds and fps) | --------------------------------------------------------------------- -Number of samples run: 46080 -Min latency: 46.68 ms (21.420 fps) -Median latency: 48.96 ms (20.427 fps) -Average latency: 50.00 ms (20.000 fps) -90 percentile latency: 53.00 ms (18.869 fps) -99 percentile latency: 53.64 ms (18.641 fps) -Max latency: 57.20 ms (17.481 fps) --------------------------------------------------------------------- -... -================================================ -MLPerf Results Summary -================================================ -SUT name : PySUT -Scenario : Multi Stream -Mode : Performance -Samples per query : 32 -Result is : INVALID - Performance constraints satisfied : NO - Min duration satisfied : Yes - Min queries satisfied : Yes -Recommendations: - * Reduce samples per query to improve latency. -... -``` - -In this example (on the NVIDIA GTX1080), the 99th percentile latency exceeds 50 ms, -which unfortunately makes the performance run **INVALID** according to the -[MLPerf Inference rules](https://github.com/mlperf/inference_policies/blob/master/inference_rules.adoc#41-benchmarks) -for the ResNet workload in the MultiStream scenario. As per the LoadGen recommendation, the number of samples per query (32 in the above example), should be reduced. -However, we do not know whether it should be reduced by only one sample per query or more. -To find out, we should [benchmark](#benchmark) this workload with several values of this parameter, and [analyze](#analyze) the results. - -#### ResNet, int8, 15 samples per batch - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list --rm ctuning/${CK_IMAGE} \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=PerformanceOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=15 --env.CK_BATCH_SIZE=15 \ - --env.CK_LOADGEN_COUNT_OVERRIDE=1440 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=1024 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-by.nvidia,for.gtx1080,int8 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... --------------------------------------------------------------------- -| LATENCIES (in milliseconds and fps) | --------------------------------------------------------------------- -Number of samples run: 21600 -Min latency: 12.80 ms (78.119 fps) -Median latency: 13.06 ms (76.592 fps) -Average latency: 13.00 ms (76.923 fps) -90 percentile latency: 13.12 ms (76.218 fps) -99 percentile latency: 13.17 ms (75.906 fps) -Max latency: 13.45 ms (74.349 fps) --------------------------------------------------------------------- -... -================================================ -MLPerf Results Summary -================================================ -SUT name : PySUT -Scenario : Multi Stream -Mode : Performance -Samples per query : 15 -Result is : VALID - Performance constraints satisfied : Yes - Min duration satisfied : Yes - Min queries satisfied : Yes -``` - -#### MobileNet, int8, 250 samples per batch - -```bash -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list --rm ctuning/${CK_IMAGE} \ - "ck run program:image-classification-tensorrt-loadgen-py --skip_print_timers --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=PerformanceOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=250 --env.CK_BATCH_SIZE=250 \ - --env.CK_LOADGEN_COUNT_OVERRIDE=1440 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=1024 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,mobilenet,converted-by.nvidia,for.gtx1080,int8 \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_summary.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_summary.txt \ - && echo '--------------------------------------------------------------------------------' \ - && echo 'mlperf_log_detail.txt' \ - && echo '--------------------------------------------------------------------------------' \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/tmp/mlperf_log_detail.txt \ - && echo ''" -... --------------------------------------------------------------------- -| LATENCIES (in milliseconds and fps) | --------------------------------------------------------------------- -Number of samples run: 360000 -Min latency: 75.52 ms (13.241 fps) -Median latency: 77.53 ms (12.899 fps) -Average latency: 78.00 ms (12.821 fps) -90 percentile latency: 80.66 ms (12.398 fps) -99 percentile latency: 91.22 ms (10.962 fps) -Max latency: 92.93 ms (10.761 fps) --------------------------------------------------------------------- -... -================================================ -MLPerf Results Summary -================================================ -SUT name : PySUT -Scenario : Multi Stream -Mode : Performance -Samples per query : 250 -Result is : INVALID - Performance constraints satisfied : NO - Min duration satisfied : Yes - Min queries satisfied : Yes -``` - - -## Benchmark with parameters - -When you run inference using `ck run`, the results get printed to the terminal but not saved. -You can use `ck benchmark` to save the results on the host system as CK experiment entries (JSON files). - - -### Create a directory for experimental results - -We recommend creating a new CK repository with a placeholder for experiment entries e.g.: -```bash -$ ck add repo:mlperf.closed.image-classification.velociti.tensorrt --quiet -$ ck add mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --common_func -$ ck rm mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --force -$ export CK_EXPERIMENTS_DIR=`ck find repo:mlperf.closed.image-classification.velociti.tensorrt`/experiment -``` - -Alternatively, create a directory where you want to store experiment entries e.g.: -```bash -$ export CK_EXPERIMENTS_DIR=/home/$USER/ck-experiments -$ mkdir -p ${CK_EXPERIMENTS_DIR} -``` -(**NB:** `USER` must have write access to this directory.) - -When running `ck benchmark` via Docker, we will map the internal directory `/home/dvdt/CK_REPOS/local/experiment` to `$CK_EXPERIMENTS_DIR` on the host. - -### Accuracy mode - -```bash -$ export NUM_STREAMS=30 -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list \ - --user=$(id -u):1500 --volume ${CK_EXPERIMENTS_DIR}:/home/dvdt/CK_REPOS/local/experiment \ - --rm ctuning/${CK_IMAGE} \ - "ck benchmark program:image-classification-tensorrt-loadgen-py --repetitions=1 --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=AccuracyOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=${NUM_STREAMS} --env.CK_BATCH_SIZE=${NUM_STREAMS} \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=500 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-from-onnx,fp32,maxbatch.${NUM_STREAMS} \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - --record --record_repo=local \ - --record_uoa=mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.accuracy \ - --tags=mlperf,closed,image-classification,velociti,tensorrt,resnet,multistream,accuracy \ - --skip_print_timers --skip_stat_analysis --process_multi_keys" -... -accuracy=75.200%, good=376, total=500 -``` - -### Performance mode - -```bash -$ export NUM_STREAMS=30 -$ docker run --runtime=nvidia --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list \ - --user=$(id -u):1500 --volume ${CK_EXPERIMENTS_DIR}:/home/dvdt/CK_REPOS/local/experiment \ - --rm ctuning/${CK_IMAGE} \ - "ck benchmark program:image-classification-tensorrt-loadgen-py --repetitions=1 --env.CK_SILENT_MODE \ - --env.CK_LOADGEN_MODE=PerformanceOnly --env.CK_LOADGEN_SCENARIO=MultiStream \ - --env.CK_LOADGEN_MULTISTREAMNESS=${NUM_STREAMS} --env.CK_BATCH_SIZE=${NUM_STREAMS} \ - --env.CK_LOADGEN_COUNT_OVERRIDE=1440 \ - --env.CK_LOADGEN_DATASET_SIZE=500 --env.CK_LOADGEN_BUFFER_SIZE=1024 \ - --env.CK_LOADGEN_CONF_FILE=/home/dvdt/CK_REPOS/ck-ml/program/image-classification-tensorrt-loadgen-py/user.conf \ - --dep_add_tags.weights=model,tensorrt,resnet,converted-from-onnx,fp32,maxbatch.${NUM_STREAMS} \ - --dep_add_tags.images=dataset,imagenet,preprocessed,using-opencv,rgb8 \ - --dep_add_tags.python=v3.6 --dep_add_tags.lib-python-tensorrt=v6.0 \ - --record --record_repo=local \ - --record_uoa=mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance \ - --tags=mlperf,closed,image-classification,velociti,tensorrt,resnet,multistream,performance \ - --skip_print_timers --skip_stat_analysis --process_multi_keys" -... --------------------------------------------------------------------- -| LATENCIES (in milliseconds and fps) | --------------------------------------------------------------------- -Number of samples run: 43200 -Min latency: 43.52 ms (22.977 fps) -Median latency: 44.74 ms (22.350 fps) -Average latency: 44.00 ms (22.727 fps) -90 percentile latency: 45.21 ms (22.120 fps) -99 percentile latency: 45.61 ms (21.926 fps) -Max latency: 52.87 ms (18.914 fps) --------------------------------------------------------------------- -... -================================================ -MLPerf Results Summary -================================================ -SUT name : PySUT -Scenario : Multi Stream -Mode : Performance -Samples per query : 30 -Result is : INVALID - Performance constraints satisfied : Yes - Min duration satisfied : Yes - Min queries satisfied : Yes -``` - - -### Docker parameters explained - -#### `--env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list` - -The path to an `env.list` file, which is usually located in the same directory as `Dockerfile`. - -``` -HOME=/home/dvdt -CK_ROOT=/home/dvdt/CK -CK_REPOS=/home/dvdt/CK_REPOS -CK_TOOLS=/home/dvdt/CK_TOOLS -PATH=/bin:/home/dvdt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -CK_PYTHON=python3 -CK_CC=gcc -LANG=C.UTF-8 -``` - -#### `--user=$(id -u):1500` - -`id -u` returns your user id on the host system (`USER`). `1500` is the fixed -group id of the `dvdtg` group in the image. When you launch a container with -this parameter, your can access all files accessible to the `dvdtg` group. - - -#### `--volume ${CK_EXPERIMENTS_DIR}:/home/dvdt/CK_REPOS/local/experiment` - -`CK_EXPERIMENTS_DIR` is a directory with read/write permissions for the user -that serves as shared space ("volume") between the host and the container. -This directory gets mapped to the `/home/dvdt/CK_REPOS/local/experiment` -directory in the image, which belongs to the `dvdt` user but is also made -accessible to the `dvdtg` group. Therefore, you can retrieve from -`${CK_EXPERIMENTS_DIR}` the results of a container run, which receive your user -id and the `1500` group id. - - - -### LoadGen parameters -**TODO** - - - -## Explore - -```bash -$ export CK_REPOS=$HOME/CK -$ export CK_IMAGE=image-classification-tensorrt-loadgen-py.tensorrt-6 -$ export CK_EXPERIMENTS_DIR=`ck find repo:mlperf.closed.image-classification.velociti.tensorrt`/experiment -$ cd `ck find ck-ml:docker:${CK_IMAGE}` -``` - -### Accuracy mode - -#### ResNet, fp32 - -```bash -$ CK_LOADGEN_MODEL_NAME=resnet CK_MODEL_TAGS=resnet,converted-from-onnx,maxbatch.32 CK_PRECISION=fp32 \ -CK_BATCH_SIZES=32 CK_LOADGEN_MODE=AccuracyOnly ./explore.sh -``` - -#### MobileNet, int8 - -```bash -$ CK_LOADGEN_MODEL_NAME=mobilenet CK_MODEL_TAGS=mobilenet,converted-by.nvidia,for.gtx1080 CK_PRECISION=int8 \ -CK_BATCH_SIZES=250 CK_LOADGEN_MODE=AccuracyOnly ./explore.sh -``` - -### Performance mode - -#### ResNet, fp32 - -```bash -$ CK_LOADGEN_MODEL_NAME=resnet CK_MODEL_TAGS=resnet,converted-from-onnx,maxbatch.32 CK_PRECISION=fp32 \ -CK_BATCH_SIZES="30 31 32" CK_LOADGEN_MODE=PerformanceOnly ./explore.sh -``` - -#### MobileNet, int8 - -```bash -$ CK_LOADGEN_MODEL_NAME=mobilenet CK_MODEL_TAGS=mobilenet,converted-by.nvidia,for.gtx1080 CK_PRECISION=int8 \ -CK_BATCH_SIZES="200 210 220 230 240 250" CK_LOADGEN_MODE=PerformanceOnly ./explore.sh -``` - - -# Prepare for analysis - -The results get accumulated under `$CK_EXPERIMENTS_DIR`: -``` -$ ls -la $CK_EXPERIMENTS_DIR -total 16 -. -.. -.cm -mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.accuracy -mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance - -$ tree $CK_EXPERIMENTS_DIR -... tensorrt-experiments -├── mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.accuracy -│   ├── ckp-f6af4c77a2b50fde.0001.json -│   ├── ckp-f6af4c77a2b50fde.features_flat.json -│   ├── ckp-f6af4c77a2b50fde.features.json -│   ├── ckp-f6af4c77a2b50fde.flat.json -│   ├── desc.json -│   └── pipeline.json -└── mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance - ├── ckp-0cc49387454691a5.0001.json - ├── ckp-0cc49387454691a5.features_flat.json - ├── ckp-0cc49387454691a5.features.json - ├── ckp-0cc49387454691a5.flat.json - ├── ckp-3368d49d0824b41e.0001.json - ├── ckp-3368d49d0824b41e.features_flat.json - ├── ckp-3368d49d0824b41e.features.json - ├── ckp-3368d49d0824b41e.flat.json - ├── ckp-c57a441db2d845f0.0001.json - ├── ckp-c57a441db2d845f0.features_flat.json - ├── ckp-c57a441db2d845f0.features.json - ├── ckp-c57a441db2d845f0.flat.json - ├── desc.json - └── pipeline.json -``` - -Here's a quick-and-cheap way to ascertain that 31 samples per query was the optimum number of streams: -```bash -$ cd $CK_EXPERIMENTS_DIR/*.performance && grep "Result is\"" -RH -A2 -ckp-3368d49d0824b41e.0001.json: "Result is": "VALID", -ckp-3368d49d0824b41e.0001.json- "SUT name": "PySUT", -ckp-3368d49d0824b41e.0001.json- "Samples per query": "31", --- -ckp-0cc49387454691a5.0001.json: "Result is": "VALID", -ckp-0cc49387454691a5.0001.json- "SUT name": "PySUT", -ckp-0cc49387454691a5.0001.json- "Samples per query": "30", --- -ckp-c57a441db2d845f0.0001.json: "Result is": "INVALID", -ckp-c57a441db2d845f0.0001.json- "SUT name": "PySUT", -ckp-c57a441db2d845f0.0001.json- "Samples per query": "32", -``` - -But we can do much better than that! - - - -## On any machine - -### Prepare a CK repository with the experimental results - -If you are on the same machine and you have previously [created](#experiments_dir) -`repo:mlperf.closed.image-classification.velociti.tensorrt` and set -`CK_EXPERIMENTS_DIR` to its location, you should have nothing to do. - -Otherwise: - -- On the machine with the Docker image, archive experiment entries in `CK_EXPERIMENTS_DIR` e.g.: -```bash -$ cd $CK_EXPERIMENTS_DIR -$ zip -rv mlperf.closed.image-classification.velociti.tensorrt.zip {.cm,*} -``` - -- Copy the resulting archive to a machine where you would like to analyze them. - -- On that machine, create a new repository with a placeholder for experiment entries: -```bash -$ ck add repo:mlperf.closed.image-classification.velociti.tensorrt --quiet -$ ck add mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --common_func -$ ck rm mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --force -``` - -- Extract the archive results into the new repository: -```bash -$ unzip mlperf.closed.image-classification.velociti.tensorrt.zip \ --d `ck find repo:mlperf.closed.image-classification.velociti.tensorrt`/experiment -``` - -### Convert the results into the submission format - -```bash -$ ck run ck-ml:program:dump-repo-to-submission --dep_add_tags.python=v3.6 \ ---env.CK_MLPERF_SUBMISSION_REPO=mlperf.closed.image-classification.velociti.tensorrt \ ---env.CK_MLPERF_SUBMISSION_ROOT=$HOME/mlperf-inference-unofficial-results.tensorrt -``` - -### Convert from the submission format to the dashboard format - -```bash -$ ck run ck-ml:program:dump-submissions-to-dashboard --dep_add_tags.python=v3.6 \ ---env.CK_MLPERF_SUBMISSION_ROOT=$HOME/mlperf-inference-unofficial-results.tensorrt \ ---env.CK_MLPERF_DASHBOARD_FILE=mlperf-inference-unofficial-results.tensorrt.zip \ ---env.CK_MLPERF_DASHBOARD_DIR=$HOME -``` - - -## `WORK IN PROGRESS` Using the same Docker image - -### Prepare a CK repository with the experimental results - -If you have previously [created](#experiments_dir) -`repo:mlperf.closed.image-classification.velociti.tensorrt` and set -`CK_EXPERIMENTS_DIR` to its location, you should have nothing to do. - -Otherwise: - -- Archive experiment entries in `CK_EXPERIMENTS_DIR` e.g.: -```bash -$ cd $CK_EXPERIMENTS_DIR -$ zip -rv mlperf.closed.image-classification.velociti.tensorrt.zip {.cm,*} -``` - -- Create a new repository with a placeholder for experiment entries: -```bash -$ ck add repo:mlperf.closed.image-classification.velociti.tensorrt --quiet -$ ck add mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --common_func -$ ck rm mlperf.closed.image-classification.velociti.tensorrt:experiment:dummy --force -``` - -- Extract the archive into the new repository: -```bash -$ unzip mlperf.closed.image-classification.velociti.tensorrt.zip \ --d `ck find repo:mlperf.closed.image-classification.velociti.tensorrt`/experiment -Archive: mlperf.closed.image-classification.velociti.tensorrt.zip - inflating: /home/ckuser/CK_REPOS/mlperf.closed.image-classification.velociti.tensorrt/experiment/.cm/alias-u-892d289465870473 - extracting: /home/ckuser/CK_REPOS/mlperf.closed.image-classification.velociti.tensorrt/experiment/.cm/alias-a-mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance - creating: /home/ckuser/CK_REPOS/mlperf.closed.image-classification.velociti.tensorrt/experiment/mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance/ - inflating: /home/ckuser/CK_REPOS/mlperf.closed.image-classification.velociti.tensorrt/experiment/mlperf.closed.image-classification.velociti.tensorrt.resnet.multistream.performance/ckp-3368d49d0824b41e.features.json -... -``` -### Convert the results into the submission format - -```bash -$ docker run --env-file ${CK_REPOS}/ck-ml/docker/${CK_IMAGE}/env.list \ - --user=$(id -u):1500 --volume ${CK_EXPERIMENTS_DIR}:/home/dvdt/CK_REPOS/local/experiment \ - --rm ctuning/${CK_IMAGE} \ - "ck run ck-ml:program:dump-repo-to-submission \ - --env.CK_MLPERF_SUBMISSION_REPO=local \ - --env.CK_MLPERF_SUBMISSION_ROOT=/home/dvdt/CK_REPOS/local/experiment/SUBMISSION" -``` -**NB:** Currently, this downloads the COCO 2017 validation dataset, etc., and fails on not finding `repo:ck-object-detection`. -It should do so only when object detection is needed, i.e. not for this image. - - - -## Visualize - -### Locate the dashboard plugin - -The dashboard plugin directory contains the official MLPerf Inference v0.5 results -in a custom ([pickle](https://docs.python.org/3/library/pickle.html)d -[pandas.DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)) format: - -```bash -$ ls -la `ck find ck-ml:module:mlperf.inference` -total 56 -. -.. -.cm -.gitignore -mlperf-inference-v0.5-results.zip -module.py -``` - -### Copy your results to the dashboard plugin - -Add your unofficial results there. - -#### From a remote machine - -```bash -$ scp -P :/home//mlperf-inference-unofficial-results.tensorrt.zip \ - `ck find ck-ml:module:mlperf.inference` -``` - -#### From a local machine - -```bash -$ cp mlperf-inference-unofficial-results.tensorrt.zip \ - `ck find ck-ml:module:mlperf.inference` -``` - -### Open the dashboard - -```bash -$ ck display dashboard --scenario=mlperf.inference -``` diff --git a/docker/image-classification-tensorrt-loadgen-py/env.list b/docker/image-classification-tensorrt-loadgen-py/env.list deleted file mode 100644 index 9a15d5d5..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/env.list +++ /dev/null @@ -1,8 +0,0 @@ -HOME=/home/dvdt -CK_ROOT=/home/dvdt/CK -CK_REPOS=/home/dvdt/CK_REPOS -CK_TOOLS=/home/dvdt/CK_TOOLS -PATH=/bin:/home/dvdt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -CK_PYTHON=python3 -CK_CC=gcc -LANG=C.UTF-8 diff --git a/docker/image-classification-tensorrt-loadgen-py/explore.sh b/docker/image-classification-tensorrt-loadgen-py/explore.sh deleted file mode 100644 index 39bc2db5..00000000 --- a/docker/image-classification-tensorrt-loadgen-py/explore.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/bin/bash - -echo "Tunable parameters:" - -# Batch sizes. -batch_sizes=( ${CK_BATCH_SIZES:-$(seq 1 2)} ) # use parentheses to interpret the string as an array -echo "- batch sizes: ${batch_sizes[@]}" - -echo - -echo "Configuration parameters:" - -# Docker image name. -image=${CK_IMAGE:-"image-classification-tensorrt-loadgen-py.tensorrt-6"} -echo "- image: '${image}'" - -# Path to CK repos. -repos=${CK_REPOS:-"$HOME/CK"} -echo "- CK repos: '${repos}'" - -# Path to experiment entries. -experiments_dir=${CK_EXPERIMENTS_DIR:-$HOME/tensorrt-experiments} -echo "- experiments dir: '${experiments_dir}'" -mkdir -p ${experiments_dir} - -# Dry run - print commands but do not execute them. -dry_run=${CK_DRY_RUN:-""} -echo "- dry run: ${dry_run}" - -# Skip existing experiments. -skip_existing=${CK_SKIP_EXISTING:-""} -echo "- skip existing: ${skip_existing}" - -# Task: image-classification or object-detection. -task=${CK_TASK:-"image-classification"} -echo "- task: ${task}" - -# LoadGen program. -program="${task}-tensorrt-loadgen-py" -program_dir="/home/dvdt/CK_REPOS/ck-mlperf/program/${program}" -echo "- program: '${program}'" -echo "- program directory: '${program_dir}'" - -# Platform: velociti, xavier, ... -platform=${CK_PLATFORM:-"velociti"} -echo "- platform: ${platform}" - -# Model name for LoadGen config: resnet50, ssd-resnet34, mobilenet, ssd-mobilenet, gnmt. -model_name=${CK_LOADGEN_MODEL_NAME:-"resnet"} -echo "- model name: ${model_name}" - -# Model tags. -model_tags=${CK_MODEL_TAGS:-"resnet,converted-from-onnx,maxbatch.32"} -echo "- model tags: ${model_tags}" - -# LoadGen scenario: SingleStream, MultiStream, Server, Offline. -scenario=${CK_LOADGEN_SCENARIO:-MultiStream} -if [ "${scenario}" = "SingleStream" ]; then - scenario_tag="singlestream" -elif [ "${scenario}" = "MultiStream" ]; then - scenario_tag="multistream" -elif [ "${scenario}" = "Server" ]; then - scenario_tag="server" -elif [ "${scenario}" = "Offline" ]; then - scenario_tag="offline" -else - echo "ERROR: Unsupported LoadGen scenario '${scenario}'!" - exit 1 -fi -echo "- scenario: ${scenario} (${scenario_tag})" - -# LoadGen mode: PerformanceOnly, AccuracyOnly. -mode=${CK_LOADGEN_MODE:-PerformanceOnly} -if [ "${mode}" = "PerformanceOnly" ]; then - mode_tag="performance" -elif [ "${mode}" = "AccuracyOnly" ]; then - mode_tag="accuracy" -else - echo "ERROR: Unsupported LoadGen mode '${mode}'!" - exit 1 -fi -echo "- mode: ${mode} (${mode_tag})" - -if [ "${task}" = "image-classification" ]; then - imagenet_size=500 # 50000 - if [ "${mode}" = "AccuracyOnly" ]; then - dataset_size=${CK_LOADGEN_DATASET_SIZE:-${imagenet_size}} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-500} - else - dataset_size=${CK_LOADGEN_DATASET_SIZE:-${imagenet_size}} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-1024} - fi -elif [ "${task}" = "object-detection" ]; then - coco_size=5000 - if [ "${mode}" = "AccuracyOnly" ]; then - dataset_size=${CK_LOADGEN_DATASET_SIZE:-${coco_size}} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-50} - else - if [ "${model_name}" = "ssd-mobilenet" ]; then - dataset_size=${CK_LOADGEN_DATASET_SIZE:-256} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-256} - elif [ "${model_name}" = "ssd-resnet34" ]; then - dataset_size=${CK_LOADGEN_DATASET_SIZE:-64} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-64} - else - dataset_size=${CK_LOADGEN_DATASET_SIZE:-1024} - buffer_size=${CK_LOADGEN_BUFFER_SIZE:-1024} - fi # model name - fi # mode -else - echo "ERROR: Unsupported task '${task}'!" - exit 1 -fi # task -echo "- dataset size: ${dataset_size}" -echo "- buffer size: ${buffer_size}" - -# In the PerformanceOnly mode, affects the number of samples per query that LoadGen issues -# (aiming to meet the minimum duration of 60 seconds and, in the Offline mode, the minimum -# number of samples of 24,576). -target_qps=${CK_LOADGEN_TARGET_QPS:-70} -if [ "${mode}" = "PerformanceOnly" ]; then - if [ "${scenario}" == "SingleStream" ] || [ "${scenario}" == "Offline" ]; then - TARGET_QPS="--env.CK_LOADGEN_TARGET_QPS=${target_qps}" - fi -fi -echo "- target QPS (queries per second): ${target_qps} ('${TARGET_QPS}')" - -# Allow to override the number of queries in the PerformanceOnly mode. -# By default, use 1440=720*2: -# - 720==6! (6 factorial) is evenly divisible between any number of workers 1-6. -# - 1200==60*20 is the minimum number of 50 ms queries to meet the minimum duration of 60 ms. -# - 1440 > 1200. -count_override=${CK_LOADGEN_COUNT_OVERRIDE:-1440} -if [ "${mode}" = "PerformanceOnly" ]; then - COUNT_OVERRIDE="--env.CK_LOADGEN_COUNT_OVERRIDE=${count_override}" -fi -echo "- count override: ${count_override} ('${COUNT_OVERRIDE}')" - -# Numerical precision of the TensorRT model. -precision=${CK_PRECISION:-fp32} -echo "- precision: ${precision}" - -# Input preprocessing. -preprocessing_tags=${CK_PREPROCESSING_TAGS:-"rgb8,side.224,preprocessed,using-opencv"} -echo "- preprocessing tags: ${preprocessing_tags}" - -# Timestamp. -timestamp=$(date +%Y%m%d-%H%M%S) -echo "- timestamp: ${timestamp}" - -# File to print after each iteration. -file_to_print=${CK_FILE_TO_PRINT:-""} -if [ -z "${file_to_print}" ]; then - if [ "${mode_tag}" = "accuracy" ]; then - file_to_print="accuracy.txt" - else - file_to_print="mlperf_log_summary.txt" - fi -fi - -# Prepare record UOA and tags. -mlperf="mlperf" -division="closed" -library="tensorrt" -benchmark=${model_name} -record_uoa="${mlperf}.${division}.${task}.${platform}.${library}.${benchmark}.${scenario_tag}.${mode_tag}" -record_tags="${mlperf},${division},${task},${platform},${library},${benchmark},${scenario_tag},${mode_tag}" -if [ "${mode_tag}" = "accuracy_" ]; then # FIXME: This part is intentionally disabled for the time being. - # Get substring after "preprocessed," to end, i.e. "using-opencv" here. - preprocessing="${preprocessing_tags##*preprocessed,}" - record_uoa+=".${preprocessing}" - record_tags+=",${preprocessing}" - if [ "${task}" = "image-classification" ] && [ "${dataset_size}" != "${imagenet_size}" ]; then - record_uoa+=".${dataset_size}" - record_tags+=",${dataset_size}" - fi - if [ "${task}" = "object-detection" ] && [ "${dataset_size}" != "${coco_size}" ]; then - record_uoa+=".${dataset_size}" - record_tags+=",${dataset_size}" - fi -fi -echo "- record UOA: ${record_uoa}" -echo "- record tags: ${record_tags}" - -# Blank line before printing commands. -echo - -# Skip existing experiments if requested. -if (ck find experiment:${record_uoa} >/dev/null) && [[ "${skip_existing}" ]]; then - echo "Experiment '${record_uoa}' already exists, skipping ..." - exit 0 -fi - -# Explore tunable parameters. -for batch_size in ${batch_sizes[@]}; do - read -d '' CMD < `ck locate env --tags=raw,val`/val_map.txt #-----------------------------------------------------------------------------# @@ -202,8 +203,8 @@ RUN head -n 500 `ck locate env --tags=aux`/val.txt > `ck locate env --tags=raw,v # using all (virtual) CPU cores. #-----------------------------------------------------------------------------# CMD ["export NPROCS=`grep -c processor /proc/cpuinfo` \ - && ck run ck-ml:program:mlperf-inference-v0.5 --skip_print_timers \ + && ck run ai:program:mlperf-inference-v0.5 --skip_print_timers \ --cmd_key=image-classification --env.CK_OPENVINO_MODEL_NAME=resnet50 \ --env.CK_LOADGEN_SCENARIO=Offline --env.CK_LOADGEN_MODE=Accuracy --env.CK_LOADGEN_DATASET_SIZE=500 \ --env.CK_OPENVINO_NTHREADS=$NPROCS --env.CK_OPENVINO_NSTREAMS=$NPROCS --env.CK_OPENVINO_NIREQ=$NPROCS \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/mlperf-inference-v0.5/tmp/accuracy.txt"] + && cat /home/dvdt/CK_REPOS/ai/program/mlperf-inference-v0.5/tmp/accuracy.txt"] diff --git a/docker/mlperf-inference-v0.7.openvino/Dockerfile.ubuntu-20.04 b/docker/mlperf-inference-v0.7.openvino/Dockerfile.ubuntu-20.04 index c2d87d2d..45ab70fb 100644 --- a/docker/mlperf-inference-v0.7.openvino/Dockerfile.ubuntu-20.04 +++ b/docker/mlperf-inference-v0.7.openvino/Dockerfile.ubuntu-20.04 @@ -2,7 +2,7 @@ FROM ubuntu:20.04 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -75,8 +75,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy @@ -121,7 +121,7 @@ RUN ck install package --tags=lib,loadgen,static #-----------------------------------------------------------------------------# RUN ck install package --tags=lib,intel,open-model-zoo,2020.2 RUN ck install package --tags=lib,openvino,2020.2 -RUN ck compile ck-ml:program:mlperf-inference-v0.5 \ +RUN ck compile ai:program:mlperf-inference-v0.5 \ --dep_add_tags.opencv=with-variations #-----------------------------------------------------------------------------# @@ -185,7 +185,7 @@ RUN ck install package --tags=tool,coco,api # Step 9. Make final preparations to run the OpenVINO program. #-----------------------------------------------------------------------------# # Allow the program create tmp files when running under an external user. -RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` +RUN chmod -R g+rwx `ck find ai:program:mlperf-inference-v0.5` #- # The program expects to find val_map.txt in the dataset directory (segfaults otherwise). #- RUN head -n 500 `ck locate env --tags=aux`/val.txt > `ck locate env --tags=raw,val`/val_map.txt #- #-----------------------------------------------------------------------------# @@ -198,11 +198,11 @@ RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` #- # using all (virtual) CPU cores. #- #-----------------------------------------------------------------------------# #- CMD ["export NPROCS=`grep -c processor /proc/cpuinfo` \ -#- && ck run ck-ml:program:mlperf-inference-v0.5 --skip_print_timers \ +#- && ck run ai:program:mlperf-inference-v0.5 --skip_print_timers \ #- --cmd_key=image-classification --env.CK_OPENVINO_MODEL_NAME=resnet50 \ #- --env.CK_LOADGEN_SCENARIO=Offline --env.CK_LOADGEN_MODE=Accuracy --env.CK_LOADGEN_DATASET_SIZE=500 \ #- --env.CK_OPENVINO_NTHREADS=$NPROCS --env.CK_OPENVINO_NSTREAMS=$NPROCS --env.CK_OPENVINO_NIREQ=$NPROCS \ -#- && cat /home/dvdt/CK_REPOS/ck-ml/program/mlperf-inference-v0.5/tmp/accuracy.txt"] +#- && cat /home/dvdt/CK_REPOS/ai/program/mlperf-inference-v0.5/tmp/accuracy.txt"] #- #-----------------------------------------------------------------------------# @@ -212,8 +212,8 @@ RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` # using all (virtual) CPU cores. #-----------------------------------------------------------------------------# CMD ["export NPROCS=`grep -c processor /proc/cpuinfo` \ - && ck run ck-ml:program:mlperf-inference-v0.5 --skip_print_timers \ + && ck run ai:program:mlperf-inference-v0.5 --skip_print_timers \ --cmd_key=object-detection --env.CK_OPENVINO_MODEL_NAME=ssd-mobilenet \ --env.CK_LOADGEN_SCENARIO=Offline --env.CK_LOADGEN_MODE=Accuracy --env.CK_LOADGEN_DATASET_SIZE=50 \ --env.CK_OPENVINO_NTHREADS=$NPROCS --env.CK_OPENVINO_NSTREAMS=$NPROCS --env.CK_OPENVINO_NIREQ=$NPROCS \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/mlperf-inference-v0.5/tmp/accuracy.txt"] + && cat /home/dvdt/CK_REPOS/ai/program/mlperf-inference-v0.5/tmp/accuracy.txt"] diff --git a/docker/mlperf-inference-vision-tensorrt-with-ck/.cm/meta.json b/docker/mlperf-inference-vision-tensorrt-with-ck/.cm/meta.json index 0667a122..c9f74771 100644 --- a/docker/mlperf-inference-vision-tensorrt-with-ck/.cm/meta.json +++ b/docker/mlperf-inference-vision-tensorrt-with-ck/.cm/meta.json @@ -9,7 +9,6 @@ "docker_tags": [ "tensorrt-7-20.03-py3-tf-2.1.0" ], - "outdated": "yes", "tags": [ "adaptive-container", "ck", diff --git a/docker/mlperf-inference-vision-tensorrt-with-ck/Dockerfile.tensorrt-7-20.03-py3-tf-2.1.0 b/docker/mlperf-inference-vision-tensorrt-with-ck/Dockerfile.tensorrt-7-20.03-py3-tf-2.1.0 index d8f58c04..448f98d2 100644 --- a/docker/mlperf-inference-vision-tensorrt-with-ck/Dockerfile.tensorrt-7-20.03-py3-tf-2.1.0 +++ b/docker/mlperf-inference-vision-tensorrt-with-ck/Dockerfile.tensorrt-7-20.03-py3-tf-2.1.0 @@ -2,9 +2,9 @@ FROM nvcr.io/nvidia/tensorrt:20.03-py3 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo -LABEL maintainer="Grigori Fursin " -LABEL maintainer="Anton Lokhmotov " +# with the latest CK components from ctuning@ai repo. +# Works with AWS: Deep Learning AMI (Ubuntu 18.04) Version 44.0 - ami-0e5406a90a38f0b79 +# g4dn.xlarge # Use the Bash shell. SHELL ["/bin/bash", "-c"] @@ -61,8 +61,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy @@ -121,10 +121,9 @@ RUN ck detect soft:compiler.cuda --full_path=/usr/local/cuda-10.2/bin/nvcc \ && ck detect soft:lib.cublas --full_path=/usr/lib/x86_64-linux-gnu/libcublas.so \ && ck detect soft:lib.cudnn # Install TF build dependencies. -RUN ck install ck-env:package:jdk-8u131-universal -RUN ck install ck-env:package:tool-bazel-0.27.1-linux +RUN ck install package:jdk-8u131-universal +RUN ck install package:tool-bazel-0.27.1-linux # Build TF from sources with TensorRT support. Remove the Bazel cache (~16 GB) once done. -RUN ck pull repo:ck-env RUN ck install package --tags=lib,tensorflow,vsrc,vcuda,v2.1.0 \ --env.CK_TF_NEED_TENSORRT=YES --cus.version=2.1.0\ && rm -rf ~/.cache/bazel @@ -151,7 +150,7 @@ RUN ck install package --tags=tool,coco,api #-----------------------------------------------------------------------------# # Install TF model API, but remove useless API files to free up space. RUN ck detect soft --tags=cmake --full_path=/usr/local/bin/cmake -RUN ck install package --tags=model,tensorflow,api\ +RUN ck install package --tags=model,tensorflow,api,r1.13.0\ && ck virtual env --tags=model,tensorflow,api --shell_cmd=\ 'cd $CK_ENV_TENSORFLOW_MODELS;\ mv object_detection ..;\ @@ -163,18 +162,19 @@ RUN ck install package --tags=model,tensorflow,api\ rm tutorials -rf;\ rm .git -rf' -RUN ck install package --tags=rcnn,nas,lowproposals,vcoco\ - && ck install package --tags=rcnn,resnet50,lowproposals\ - && ck install package --tags=rcnn,resnet101,lowproposals\ - && ck install package --tags=rcnn,inception-resnet-v2,lowproposals\ - && ck install package --tags=rcnn,inception-v2\ - && ck install package --tags=ssd,inception-v2\ - && ck install package --tags=ssd,mobilenet-v1,non-quantized,mlperf,tf\ - && ck install package --tags=ssd,mobilenet-v1,quantized,mlperf,tf\ - && ck install package --tags=ssd,mobilenet-v1,fpn\ - && ck install package --tags=ssd,resnet50,fpn\ - && ck install package --tags=ssdlite,mobilenet-v2,vcoco\ - && ck install package --tags=yolo-v3 +RUN ck install package --tags=rcnn,nas,lowproposals,vcoco +RUN ck install package --tags=rcnn,resnet50,lowproposals +RUN ck install package --tags=rcnn,resnet101,lowproposals +RUN ck install package --tags=rcnn,inception-resnet-v2,lowproposals +RUN ck install package --tags=rcnn,inception-v2 +RUN ck install package --tags=ssd,inception-v2 +RUN ck install package --tags=ssd,mobilenet-v1,non-quantized,mlperf,tf,from-zenodo +RUN ck install package --tags=ssd,mobilenet-v1,quantized,mlperf,tf,from-zenodo +RUN ck install package --tags=ssd,mobilenet-v1,fpn +RUN ck install package --tags=ssd,resnet50,fpn +RUN ck install package --tags=ssdlite,mobilenet-v2,vcoco +RUN ck install package --tags=yolo-v3 + #-----------------------------------------------------------------------------# @@ -185,7 +185,7 @@ RUN ck install package --tags=rcnn,nas,lowproposals,vcoco\ # (Some have already been installed.) RUN ck install package --tags=lib,python-package,cv2,opencv-python-headless # Allow the program create tmp files when running under an external user. -RUN chmod -R g+rwx ${CK_REPOS}/ck-tensorflow/program/object-detection-tf-py/ +RUN chmod -R g+rwx ${CK_REPOS}/ai/program/object-detection-tf-py/ #-----------------------------------------------------------------------------# diff --git a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-1.15.2-mkl-py3 b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-1.15.2-mkl-py3 index a208e705..d70f3d4b 100644 --- a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-1.15.2-mkl-py3 +++ b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-1.15.2-mkl-py3 @@ -2,7 +2,7 @@ FROM intelaipg/intel-optimized-tensorflow:1.15.2-mkl-py3 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -59,8 +59,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy diff --git a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.0.1-mkl-py3 b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.0.1-mkl-py3 index 46e758b9..8471231d 100644 --- a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.0.1-mkl-py3 +++ b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.0.1-mkl-py3 @@ -2,7 +2,7 @@ FROM intelaipg/intel-optimized-tensorflow:2.0.1-mkl-py3 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -59,8 +59,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. diff --git a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.1.0-mkl-py3 b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.1.0-mkl-py3 index e29beeff..31c5c609 100644 --- a/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.1.0-mkl-py3 +++ b/docker/mlperf-inference-vision-with-ck/Dockerfile.ubuntu-18.04-tf-2.1.0-mkl-py3 @@ -2,7 +2,7 @@ FROM intelaipg/intel-optimized-tensorflow:2.1.0-mkl-py3 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -59,8 +59,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. diff --git a/docker/object-detection-openvino/Dockerfile.ubuntu-18.04 b/docker/object-detection-openvino/Dockerfile.ubuntu-18.04 index cfc6cfe4..34392952 100644 --- a/docker/object-detection-openvino/Dockerfile.ubuntu-18.04 +++ b/docker/object-detection-openvino/Dockerfile.ubuntu-18.04 @@ -2,7 +2,7 @@ FROM ubuntu:18.04 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo +# with the latest CK components from ctuning@ai repo LABEL maintainer="Grigori Fursin " # Use the Bash shell. @@ -58,8 +58,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy @@ -105,7 +105,7 @@ RUN ck install package --tags=lib,loadgen,static #-----------------------------------------------------------------------------# RUN ck install package --tags=lib,intel,open-model-zoo,2019_R3 RUN ck install package --tags=lib,openvino,2019_R3 -RUN ck compile ck-ml:program:mlperf-inference-v0.5 +RUN ck compile ai:program:mlperf-inference-v0.5 #-----------------------------------------------------------------------------# @@ -137,7 +137,7 @@ RUN ck install package --tags=tool,coco,api # Step 6. Make final preparations to run the OpenVINO program. #-----------------------------------------------------------------------------# # Allow the program create tmp files when running under an external user. -RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` +RUN chmod -R g+rwx `ck find ai:program:mlperf-inference-v0.5` #-----------------------------------------------------------------------------# @@ -148,7 +148,7 @@ RUN chmod -R g+rwx `ck find ck-ml:program:mlperf-inference-v0.5` # using all (virtual) CPU cores. #-----------------------------------------------------------------------------# CMD ["export NPROCS=`grep -c processor /proc/cpuinfo` \ - && ck run ck-ml:program:mlperf-inference-v0.5 --cmd_key=object-detection --skip_print_timers \ + && ck run ai:program:mlperf-inference-v0.5 --cmd_key=object-detection --skip_print_timers \ --env.CK_LOADGEN_SCENARIO=Offline --env.CK_LOADGEN_MODE=Accuracy --env.CK_LOADGEN_DATASET_SIZE=50 \ --env.CK_OPENVINO_NTHREADS=$NPROCS --env.CK_OPENVINO_NSTREAMS=$NPROCS --env.CK_OPENVINO_NIREQ=$NPROCS \ - && cat /home/dvdt/CK_REPOS/ck-ml/program/mlperf-inference-v0.5/tmp/accuracy.txt"] + && cat /home/dvdt/CK_REPOS/ai/program/mlperf-inference-v0.5/tmp/accuracy.txt"] diff --git a/docker/object-detection-tf-py-tensorrt/.cm/meta.json b/docker/object-detection-tf-py-tensorrt/.cm/meta.json index bb32d0ad..ad874143 100644 --- a/docker/object-detection-tf-py-tensorrt/.cm/meta.json +++ b/docker/object-detection-tf-py-tensorrt/.cm/meta.json @@ -9,7 +9,6 @@ "docker_tags": [ "tensorrt-7-20.03-py3" ], - "outdated": "yes", "tags": [ "adaptive-container", "ck", diff --git a/docker/object-detection-tf-py-tensorrt/Dockerfile.tensorrt-7-20.03-py3 b/docker/object-detection-tf-py-tensorrt/Dockerfile.tensorrt-7-20.03-py3 index 80c6b914..2af3049f 100644 --- a/docker/object-detection-tf-py-tensorrt/Dockerfile.tensorrt-7-20.03-py3 +++ b/docker/object-detection-tf-py-tensorrt/Dockerfile.tensorrt-7-20.03-py3 @@ -2,10 +2,11 @@ FROM nvcr.io/nvidia/tensorrt:20.03-py3 # News: # * 20210525: Grigori updated this container to support the latest CK framework -# with the latest CK components from ctuning@ck-ml repo -# However, it currently fails with CUDA run-time error +# with the latest CK components from ctuning@ck-ml repo . +# Works with AWS: Deep Learning AMI (Ubuntu 18.04) Version 44.0 - ami-0e5406a90a38f0b79 +# g4dn.xlarge + LABEL maintainer="Grigori Fursin " -LABEL maintainer="Anton Lokhmotov " # Use the Bash shell. SHELL ["/bin/bash", "-c"] @@ -62,8 +63,9 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user RUN ck create_entry --data_uoa=experiment --data_uid=bc0409fb61f0aa82 --path=${CK_REPOS}/local\ && chmod -R g+w ${CK_REPOS}/local/experiment -# Pull CK repositories (including ck-mlperf, ck-env, ck-autotuning, ck-tensorflow, ck-docker). -RUN ck pull repo:ck-object-detection +# Pull CK repositories +#RUN ck pull repo:ck-object-detection +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy @@ -124,10 +126,9 @@ RUN ck detect soft:compiler.cuda --full_path=/usr/local/cuda-10.2/bin/nvcc \ && ck detect soft:lib.cublas --full_path=/usr/lib/x86_64-linux-gnu/libcublas.so \ && ck detect soft:lib.cudnn # Install TF build dependencies. -RUN ck install ck-env:package:jdk-8u131-universal -RUN ck install ck-env:package:tool-bazel-0.27.1-linux +RUN ck install package:jdk-8u131-universal +RUN ck install package:tool-bazel-0.27.1-linux # Build TF from sources with TensorRT support. Remove the Bazel cache (~16 GB) once done. -RUN ck pull repo:ck-env RUN ck install package --tags=lib,tensorflow,vsrc,vcuda,v2.1.0 \ --env.CK_TF_NEED_TENSORRT=YES --cus.version=2.1.0\ && rm -rf ~/.cache/bazel @@ -154,7 +155,7 @@ RUN ck install package --tags=tool,coco,api #-----------------------------------------------------------------------------# # Install TF model API, but remove useless API files to free up space. RUN ck detect soft --tags=cmake --full_path=/usr/local/bin/cmake -RUN ck install package --tags=model,tensorflow,api\ +RUN ck install package --tags=model,tensorflow,api,r1.13.0\ && ck virtual env --tags=model,tensorflow,api --shell_cmd=\ 'cd $CK_ENV_TENSORFLOW_MODELS;\ mv object_detection ..;\ @@ -167,16 +168,16 @@ RUN ck install package --tags=model,tensorflow,api\ rm .git -rf' RUN ck install package --tags=rcnn,nas,lowproposals,vcoco -RUN ck install package --tags=rcnn,resnet50,lowproposals\ -RUN ck install package --tags=rcnn,resnet101,lowproposals\ -RUN ck install package --tags=rcnn,inception-resnet-v2,lowproposals\ -RUN ck install package --tags=rcnn,inception-v2\ -RUN ck install package --tags=ssd,inception-v2\ -RUN ck install package --tags=ssd,mobilenet-v1,non-quantized,mlperf,tf\ -RUN ck install package --tags=ssd,mobilenet-v1,quantized,mlperf,tf\ -RUN ck install package --tags=ssd,mobilenet-v1,fpn\ -RUN ck install package --tags=ssd,resnet50,fpn\ -RUN ck install package --tags=ssdlite,mobilenet-v2,vcoco\ +RUN ck install package --tags=rcnn,resnet50,lowproposals +RUN ck install package --tags=rcnn,resnet101,lowproposals +RUN ck install package --tags=rcnn,inception-resnet-v2,lowproposals +RUN ck install package --tags=rcnn,inception-v2 +RUN ck install package --tags=ssd,inception-v2 +RUN ck install package --tags=ssd,mobilenet-v1,non-quantized,mlperf,tf,from-zenodo +RUN ck install package --tags=ssd,mobilenet-v1,quantized,mlperf,tf,from-zenodo +RUN ck install package --tags=ssd,mobilenet-v1,fpn +RUN ck install package --tags=ssd,resnet50,fpn +RUN ck install package --tags=ssdlite,mobilenet-v2,vcoco RUN ck install package --tags=yolo-v3 #-----------------------------------------------------------------------------# @@ -188,7 +189,7 @@ RUN ck install package --tags=yolo-v3 # (Some have already been installed.) RUN ck install package --tags=lib,python-package,cv2,opencv-python-headless # Allow the program create tmp files when running under an external user. -RUN chmod -R g+rwx ${CK_REPOS}/ck-tensorflow/program/object-detection-tf-py/ +RUN chmod -R g+rwx ${CK_REPOS}/ai/program/object-detection-tf-py/ #-----------------------------------------------------------------------------# @@ -199,5 +200,5 @@ RUN chmod -R g+rwx ${CK_REPOS}/ck-tensorflow/program/object-detection-tf-py/ #-----------------------------------------------------------------------------# CMD ["ck run program:object-detection-tf-py \ --dep_add_tags.lib-tensorflow=python-package \ ---dep_add_tags.weights=ssd-mobilenet,non-quantized,mlperf \ +--dep_add_tags.weights=ssd-mobilenet,non-quantized,mlperf,from-zenodo \ --env.CK_BATCH_SIZE=1 --env.CK_BATCH_COUNT=50"] diff --git a/docker/object-detection-tf-py/Dockerfile.debian-9 b/docker/object-detection-tf-py/Dockerfile.debian-9 index 1f5600d0..2a362251 100644 --- a/docker/object-detection-tf-py/Dockerfile.debian-9 +++ b/docker/object-detection-tf-py/Dockerfile.debian-9 @@ -50,8 +50,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install --ignore-installed pip setuptools wh RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install pyyaml virtualenv --user RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user -# Pull CK repositories (including ck-env, ck-autotuning and ck-tensorflow). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy diff --git a/docker/object-detection-tflite/Dockerfile.debian-9 b/docker/object-detection-tflite/Dockerfile.debian-9 index 32161ebf..baaf6082 100644 --- a/docker/object-detection-tflite/Dockerfile.debian-9 +++ b/docker/object-detection-tflite/Dockerfile.debian-9 @@ -50,8 +50,8 @@ RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install --ignore-installed pip setuptools wh RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install pyyaml virtualenv --user RUN ${DUMMY_CK} ${CK_PYTHON} -m pip install ck --user -# Pull CK repositories (including ck-env, ck-autotuning and ck-tensorflow). -RUN ck pull repo:ck-ml +# Pull CK repositories +RUN ck pull repo:ai # Use generic Linux settings with dummy frequency setting scripts. RUN ck detect platform.os --platform_init_uoa=generic-linux-dummy