This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new c936a81  docker: Drop caffe2 download progess bars (#5359)
c936a81 is described below

commit c936a81dab2b4b4b595d02153a6654b9d4e09cd5
Author: Marcus Shawcroft <[email protected]>
AuthorDate: Fri Apr 17 19:05:42 2020 +0100

    docker: Drop caffe2 download progess bars (#5359)
    
    Change-Id: Ia15c3c8f41f75423814e559f6fdb062098f19464
---
 docker/install/ubuntu_install_caffe2.sh | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/docker/install/ubuntu_install_caffe2.sh 
b/docker/install/ubuntu_install_caffe2.sh
index a9c1d19..fa091f9 100755
--- a/docker/install/ubuntu_install_caffe2.sh
+++ b/docker/install/ubuntu_install_caffe2.sh
@@ -20,6 +20,20 @@ set -e
 set -u
 set -o pipefail
 
-python3 -m caffe2.python.models.download -i -f squeezenet
-python3 -m caffe2.python.models.download -i -f resnet50
-python3 -m caffe2.python.models.download -i -f vgg19
+# caffe2.python.module.download generates a progress bar. in non
+# interactive use this results in huge progress debris in the log
+# files.  There is no option to disable the progress bar so work
+# around it by stripping the progress bar output
+
+filter_progress_bar()
+{
+  # Progress bars are the 'goto start of line' escape sequence
+  # ESC[1000D[ repeated, the end of the progress bar is the end of
+  # line.  We can selectively remove progress bars by dropping lines
+  # that beging with the escape sequence.
+  sed "/^\x1b\[1000D/d"
+}
+
+python3 -m caffe2.python.models.download -i -f squeezenet | filter_progress_bar
+python3 -m caffe2.python.models.download -i -f resnet50 | filter_progress_bar
+python3 -m caffe2.python.models.download -i -f vgg19 | filter_progress_bar

Reply via email to