From c93b69ff511a3e1b858c34af8287f8e4858e9e17 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Fri, 27 Sep 2019 09:34:02 -0700 Subject: [PATCH] [DOCKER] make demo images consistent with ci images when possible. (#4024) --- docker/Dockerfile.ci_gpu | 3 +-- docker/Dockerfile.demo_cpu | 23 +---------------------- docker/Dockerfile.demo_gpu | 23 +++-------------------- docker/install/install_tvm_cpu.sh | 9 ++++++--- docker/install/install_tvm_gpu.sh | 9 ++++++--- 5 files changed, 17 insertions(+), 50 deletions(-) diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu index 5a55301..b648eac 100644 --- a/docker/Dockerfile.ci_gpu +++ b/docker/Dockerfile.ci_gpu @@ -16,7 +16,7 @@ # under the License. # CI docker GPU env -# tag: v0.50 +# tag: v0.54 FROM nvidia/cuda:8.0-cudnn7-devel # Base scripts @@ -72,7 +72,6 @@ RUN bash /install/ubuntu_install_coreml.sh COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh RUN bash /install/ubuntu_install_tensorflow.sh - COPY install/ubuntu_install_darknet.sh /install/ubuntu_install_darknet.sh RUN bash /install/ubuntu_install_darknet.sh diff --git a/docker/Dockerfile.demo_cpu b/docker/Dockerfile.demo_cpu index bc00608..63dc3a1 100644 --- a/docker/Dockerfile.demo_cpu +++ b/docker/Dockerfile.demo_cpu @@ -17,22 +17,7 @@ # Minimum docker image for demo purposes # prebuilt-image: tvmai/demo-cpu -FROM ubuntu:16.04 - -RUN apt-get update --fix-missing - -COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh -RUN bash /install/ubuntu_install_core.sh - -# Python: basic dependencies -RUN apt-get update && apt-get install -y python3-dev python3-pip -RUN pip3 install numpy pytest cython decorator scipy - -# LLVM -RUN echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main \ - >> /etc/apt/sources.list.d/llvm.list && \ - wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - && \ - apt-get update && apt-get install -y --force-yes llvm-6.0 +FROM tvmai/ci-cpu:v0.52 # Jupyter notebook. RUN pip3 install matplotlib Image Pillow jupyter[notebook] @@ -40,12 +25,6 @@ RUN pip3 install matplotlib Image Pillow jupyter[notebook] # Deep learning frameworks RUN pip3 install mxnet tensorflow keras gluoncv dgl -# Chisel -RUN echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list -RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 -RUN sudo apt-get update -RUN sudo apt-get install -y verilator sbt - # Build TVM COPY install/install_tvm_cpu.sh /install/install_tvm_cpu.sh RUN bash /install/install_tvm_cpu.sh diff --git a/docker/Dockerfile.demo_gpu b/docker/Dockerfile.demo_gpu index 35ab541..9be8c00 100644 --- a/docker/Dockerfile.demo_gpu +++ b/docker/Dockerfile.demo_gpu @@ -16,30 +16,13 @@ # under the License. # Minimum docker image for demo purposes -# prebuilt-image: tvmai/demo-gpu -FROM nvidia/cuda:9.0-cudnn7-devel - -RUN apt-get update --fix-missing - -COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh -RUN bash /install/ubuntu_install_core.sh - -# Python: basic dependencies -RUN apt-get update && apt-get install -y python3-dev python3-pip -RUN pip3 install numpy pytest cython decorator scipy - -# LLVM -RUN echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main \ - >> /etc/apt/sources.list.d/llvm.list && \ - wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - && \ - apt-get update && apt-get install -y --force-yes llvm-6.0 +# CI docker GPU env +# tag: v0.54 +FROM tvmai/ci-gpu:v0.54 # Jupyter notebook. RUN pip3 install matplotlib Image Pillow jupyter[notebook] -# Deep learning frameworks -RUN pip3 install mxnet tensorflow keras gluoncv dgl - # Build TVM COPY install/install_tvm_gpu.sh /install/install_tvm_gpu.sh RUN bash /install/install_tvm_gpu.sh diff --git a/docker/install/install_tvm_cpu.sh b/docker/install/install_tvm_cpu.sh index c67206a..efe2d21 100755 --- a/docker/install/install_tvm_cpu.sh +++ b/docker/install/install_tvm_cpu.sh @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -23,7 +23,10 @@ set -o pipefail cd /usr git clone --depth=1 https://github.com/dmlc/tvm --recursive cd /usr/tvm -echo set\(USE_LLVM llvm-config-6.0\) >> config.cmake +# checkout a hash-tag +git checkout 4b13bf668edc7099b38d463e5db94ebc96c80470 + +echo set\(USE_LLVM llvm-config-8\) >> config.cmake echo set\(USE_RPC ON\) >> config.cmake echo set\(USE_SORT ON\) >> config.cmake echo set\(USE_GRAPH_RUNTIME ON\) >> config.cmake diff --git a/docker/install/install_tvm_gpu.sh b/docker/install/install_tvm_gpu.sh index 57bee08..e91cd9a 100755 --- a/docker/install/install_tvm_gpu.sh +++ b/docker/install/install_tvm_gpu.sh @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -23,7 +23,10 @@ set -o pipefail cd /usr git clone --depth=1 https://github.com/dmlc/tvm --recursive cd /usr/tvm -echo set\(USE_LLVM llvm-config-6.0\) >> config.cmake +# checkout a hash-tag +git checkout 4b13bf668edc7099b38d463e5db94ebc96c80470 + +echo set\(USE_LLVM llvm-config-8\) >> config.cmake echo set\(USE_CUDA ON\) >> config.cmake echo set\(USE_CUDNN ON\) >> config.cmake echo set\(USE_RPC ON\) >> config.cmake -- 2.7.4