Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Remove apt cache from the docker images #11470

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docker/Dockerfile.ci_arm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@

FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing
RUN apt-get install -y ca-certificates gnupg2

RUN apt-install-and-clear -y ca-certificates gnupg2

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# CI docker CPU env
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# tag: v0.60
FROM nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

# Per https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212772
# we need to add a new GPG key before running apt update.
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
Expand Down Expand Up @@ -55,7 +57,7 @@ COPY install/ubuntu_install_sphinx.sh /install/ubuntu_install_sphinx.sh
RUN bash /install/ubuntu_install_sphinx.sh

# Enable doxygen for c++ doc build
RUN apt-get update && apt-get install -y doxygen libprotobuf-dev protobuf-compiler
RUN apt-get update && apt-install-and-clear -y doxygen libprotobuf-dev protobuf-compiler

COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
RUN bash /install/ubuntu_install_java.sh
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile.ci_hexagon
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
# tag: v0.02
FROM tvmcihexagon/ci-hexagon-base:v0.02_SDK4.5.0.3

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing
RUN apt-get install -y ca-certificates gnupg2 libxml2-dev

RUN apt-install-and-clear -y ca-certificates gnupg2 libxml2-dev

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.ci_i386
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

FROM i386/ubuntu:18.04

RUN apt-get update --fix-missing && apt-get install -y ca-certificates
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

RUN apt-install-and-clear -y ca-certificates

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
Expand Down
7 changes: 5 additions & 2 deletions docker/Dockerfile.ci_jekyll
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# tag: v0.50
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y sudo wget
RUN apt-get update && apt-get install -y ruby-full build-essential zlib1g-dev
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update

RUN apt-install-and-clear -y sudo wget ruby-full build-essential zlib1g-dev
RUN gem install jekyll bundler
6 changes: 4 additions & 2 deletions docker/Dockerfile.ci_lint
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
# tag: v0.60
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

RUN apt-get update && apt-get install -y wget git sudo make parallel
RUN apt-install-and-clear -y wget git sudo make parallel

COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.no-cache-dir false

RUN apt-get update && apt-get install -y doxygen graphviz curl shellcheck
RUN apt-get update && apt-install-and-clear -y doxygen graphviz curl shellcheck

RUN pip3 install cpplint pylint==2.4.4 mypy==0.902 black==22.3.0 flake8==3.9.2 blocklint==0.2.3 jinja2==3.0.3

Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.ci_qemu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# tag: v0.62
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.ci_wasm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# under the License.
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.conda_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

FROM ubuntu:16.04

RUN apt-get update --fix-missing && apt-get install -y bzip2 wget sudo binutils git
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

RUN apt-install-and-clear -y bzip2 wget sudo binutils git

COPY install/ubuntu_install_conda.sh /install/ubuntu_install_conda.sh
RUN bash /install/ubuntu_install_conda.sh
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.conda_cuda100
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

FROM nvidia/cuda:10.0-devel-ubuntu16.04

RUN apt-get update --fix-missing && apt-get install -y bzip2 wget sudo binutils git
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

RUN apt-install-and-clear -y bzip2 wget sudo binutils git

RUN wget -q http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.0/cudnn-10.0-linux-x64-v7.6.0.64.tgz && \
tar --no-same-owner -xzf cudnn-10.0-linux-x64-v7.6.0.64.tgz -C /usr/local && \
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.conda_cuda90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

FROM nvidia/cuda:9.0-devel-ubuntu16.04

RUN apt-get update --fix-missing && apt-get install -y bzip2 wget sudo binutils git
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

RUN apt-install-and-clear -y bzip2 wget sudo binutils git

RUN wget -q http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.0/cudnn-9.0-linux-x64-v7.6.0.64.tgz && \
tar --no-same-owner -xzf cudnn-9.0-linux-x64-v7.6.0.64.tgz -C /usr/local && \
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.demo_android
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Minimum docker image for demo purposes
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.demo_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# prebuilt-image: tvmai/demo-cpu
FROM tlcpack/ci-cpu:v0.55

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

# Jupyter notebook.
RUN pip3 install matplotlib Image Pillow jupyter[notebook]

Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.demo_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# tag: v0.54
FROM tlcpack/ci-gpu:v0.55

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

# Jupyter notebook.
RUN pip3 install matplotlib Image "Pillow<7" jupyter[notebook]

Expand Down
18 changes: 8 additions & 10 deletions docker/Dockerfile.demo_opencl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN echo "Labelling this image"
LABEL Description="Docker image for TVM built with OpenCL & OpenGL support"

Expand All @@ -30,29 +32,25 @@ RUN apt-get update
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN echo "Installing utility libraries"
RUN apt-get install -y apt-utils sudo
RUN apt-get install -y cmake g++ llvm
RUN apt-get install -y git
# make wget unzip libtinfo-dev libz-dev libcurl4-openssl-dev
RUN apt-get install -y libopenblas-dev
RUN apt-install-and-clear -y apt-utils sudo cmake g++ llvm git libopenblas-dev

# RUN echo "Installing gtest"
# RUN apt-get install -y libgtest-dev
# RUN apt-install-and-clear -y libgtest-dev
# RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && cp *.a /usr/lib

RUN echo "Installing Python"
RUN apt-get install -y python3-dev python3-pip
RUN apt-install-and-clear -y python3-dev python3-pip
RUN pip3 install setuptools numpy pytest cython decorator scipy tornado psutil xgboost

RUN echo "Installing Jupyter notebook"
RUN pip3 install matplotlib Image "Pillow<7" jupyter[notebook]

RUN echo "Installing OpenCL libraries"
RUN apt-get install -y libviennacl-dev mesa-opencl-icd ocl-icd-opencl-dev clinfo
RUN apt-get install -y libclblas-dev libclfft-dev libclsparse-dev
RUN apt-install-and-clear -y libviennacl-dev mesa-opencl-icd ocl-icd-opencl-dev clinfo
RUN apt-install-and-clear -y libclblas-dev libclfft-dev libclsparse-dev

RUN echo "Installing OpenGL libraries"
RUN apt-get install -y libcogl-dev libegl1 libgles1 libglfw3-dev
RUN apt-install-and-clear -y libcogl-dev libegl1 libgles1 libglfw3-dev
# libglew-dev

RUN echo "Upgrading dependencies"
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.demo_rocm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Demo docker for ROCm
FROM ubuntu:18.04

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh

Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.demo_vitis_ai
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Main Vitis AI docker env
FROM xilinx/vitis-ai:1.4.916

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile.docs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
FROM ubuntu:18.04

# Base scripts

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
Expand All @@ -36,7 +39,7 @@ COPY install/ubuntu_install_sphinx.sh /install/ubuntu_install_sphinx.sh
RUN bash /install/ubuntu_install_sphinx.sh

# Enable doxygen for c++ doc build
RUN apt-get update && apt-get install -y doxygen libprotobuf-dev protobuf-compiler
RUN apt-get update && apt-install-and-clear -y doxygen libprotobuf-dev protobuf-compiler

COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
RUN bash /install/ubuntu_install_java.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu1804_install_clang_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main\
>> /etc/apt/sources.list.d/llvm.list

wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-get update && apt-get install -y clang-format-10
apt-get update && apt-install-and-clear -y clang-format-10
2 changes: 1 addition & 1 deletion docker/install/ubuntu1804_install_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\

wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -

apt-get update && apt-get install -y \
apt-get update && apt-install-and-clear -y \
llvm-9 llvm-10 llvm-11 llvm-12 llvm-13 \
clang-9 libclang-9-dev \
clang-10 libclang-10-dev \
Expand Down
3 changes: 1 addition & 2 deletions docker/install/ubuntu1804_install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ trap cleanup 0
# Install python and pip. Don't modify this to add Python package dependencies,
# instead modify install_python_package.sh
apt-get update
apt-get install -y software-properties-common
apt-get install -y python3.7 python3.7-dev python3-pip
apt-install-and-clear -y software-properties-common python3.7 python3.7-dev python3-pip
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1

# Pin pip and setuptools versions
Expand Down
3 changes: 1 addition & 2 deletions docker/install/ubuntu1804_install_python_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ set -o pipefail

# install python and pip, don't modify this, modify install_python_package.sh
apt-get update
apt-get install -y software-properties-common
apt-get install -y python3.7-dev python3-setuptools python3.7-venv
apt-install-and-clear -y software-properties-common python3.7-dev python3-setuptools python3.7-venv

python3 -mvenv /opt/tvm-venv

Expand Down
3 changes: 1 addition & 2 deletions docker/install/ubuntu2004_install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ trap cleanup 0
# Install python and pip. Don't modify this to add Python package dependencies,
# instead modify install_python_package.sh
apt-get update
apt-get install -y software-properties-common
apt-get install -y python3.8 python3.8-dev python3-pip
apt-install-and-clear -y software-properties-common python3.8 python3.8-dev python3-pip
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1

# Pin pip and setuptools versions
Expand Down
3 changes: 2 additions & 1 deletion docker/install/ubuntu_download_arm_compute_lib_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ architecture_type=$(uname -i)
# Depending on the architecture selected to compile for,
# you may need to install an alternative cross-compiler.
if [ "$architecture_type" != "aarch64" ]; then
apt-get update && apt-get install -y --no-install-recommends \
apt-get update
apt-install-and-clear -y --no-install-recommends \
g++-aarch64-linux-gnu \
gcc-aarch64-linux-gnu
fi
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_arduino.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -u
set -o pipefail

export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates
apt-install-and-clear -y ca-certificates

ARDUINO_CLI_VERSION="0.21.1"
# Install arduino-cli
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_caffe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -euxo pipefail
apt-get update --fix-missing

# # Install dependencies
apt-get install -y --no-install-recommends protobuf-compiler \
apt-install-and-clear -y --no-install-recommends protobuf-compiler \
libprotobuf-dev libhdf5-serial-dev libopenblas-dev libgflags-dev libgoogle-glog-dev


Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -u
set -o pipefail

# install libraries for building c++ core on ubuntu
apt-get update && apt-get install -y --no-install-recommends \
apt-get update && apt-install-and-clear -y --no-install-recommends \
apt-transport-https \
ca-certificates \
cmake \
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_ethosn_driver_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ trap cleanup 0
# Ubuntu 16.04 dependencies
apt-get update

apt-get install -y \
apt-install-and-clear -y \
bsdmainutils \
build-essential \
cmake \
Expand Down
3 changes: 1 addition & 2 deletions docker/install/ubuntu_install_ethosu_driver_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ trap cleanup 0

# Ubuntu 18.04 dependencies
apt-get update

apt-get install -y \
apt-install-and-clear -y \
bsdmainutils \
build-essential \
cpp \
Expand Down
4 changes: 1 addition & 3 deletions docker/install/ubuntu_install_golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ set -o pipefail

#install the necessary dependancies for golang build
apt-get update
apt-get install -y golang-1.10-go
apt-get install -y golang-1.10-doc
apt-get install -y golint
apt-install-and-clear -y golang-1.10-go golang-1.10-doc golint
3 changes: 2 additions & 1 deletion docker/install/ubuntu_install_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
set -o errexit -o nounset
set -o pipefail

apt-get update && apt-get install -y openjdk-8-jdk maven
apt-get update
apt-install-and-clear -y openjdk-8-jdk maven
arch=$(uname -m)
jre_arch="unknown"
case $arch in
Expand Down
4 changes: 2 additions & 2 deletions docker/install/ubuntu_install_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
set -euxo pipefail

apt-get update
apt-get install -y gnupg
apt-install-and-clear -y gnupg

echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main\
>> /etc/apt/sources.list.d/llvm.list
Expand Down Expand Up @@ -47,4 +47,4 @@ echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
>> /etc/apt/sources.list.d/llvm.list

wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get install -y llvm-4.0 llvm-9 llvm-8 llvm-7 clang-9 libclang-9-dev clang-8 libclang-8-dev clang-7 libclang-7-dev
apt-install-and-clear -y llvm-4.0 llvm-9 llvm-8 llvm-7 clang-9 libclang-9-dev clang-8 libclang-8-dev clang-7 libclang-7-dev
Loading