Skip to content

Commit ada4c46

Browse files
authored
[ci] Remove apt cache from the docker images (#11470)
1 parent d0650ba commit ada4c46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+165
-73
lines changed

docker/Dockerfile.ci_arm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020

2121
FROM ubuntu:18.04
2222

23+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
24+
2325
RUN apt-get update --fix-missing
24-
RUN apt-get install -y ca-certificates gnupg2
26+
27+
RUN apt-install-and-clear -y ca-certificates gnupg2
2528

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

docker/Dockerfile.ci_cpu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
# CI docker CPU env
1919
FROM ubuntu:18.04
2020

21+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
22+
2123
RUN apt-get update --fix-missing
2224

2325
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh

docker/Dockerfile.ci_gpu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# tag: v0.60
2020
FROM nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
2121

22+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
23+
2224
# Per https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212772
2325
# we need to add a new GPG key before running apt update.
2426
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
@@ -55,7 +57,7 @@ COPY install/ubuntu_install_sphinx.sh /install/ubuntu_install_sphinx.sh
5557
RUN bash /install/ubuntu_install_sphinx.sh
5658

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

6062
COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
6163
RUN bash /install/ubuntu_install_java.sh

docker/Dockerfile.ci_hexagon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
# tag: v0.02
2020
FROM tvmcihexagon/ci-hexagon-base:v0.02_SDK4.5.0.3
2121

22+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
23+
2224
RUN apt-get update --fix-missing
23-
RUN apt-get install -y ca-certificates gnupg2 libxml2-dev
25+
26+
RUN apt-install-and-clear -y ca-certificates gnupg2 libxml2-dev
2427

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

docker/Dockerfile.ci_i386

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020

2121
FROM i386/ubuntu:18.04
2222

23-
RUN apt-get update --fix-missing && apt-get install -y ca-certificates
23+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
24+
25+
RUN apt-get update --fix-missing
26+
27+
RUN apt-install-and-clear -y ca-certificates
2428

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

docker/Dockerfile.ci_jekyll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
# tag: v0.50
2020
FROM ubuntu:16.04
2121

22-
RUN apt-get update && apt-get install -y sudo wget
23-
RUN apt-get update && apt-get install -y ruby-full build-essential zlib1g-dev
22+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
23+
24+
RUN apt-get update
25+
26+
RUN apt-install-and-clear -y sudo wget ruby-full build-essential zlib1g-dev
2427
RUN gem install jekyll bundler

docker/Dockerfile.ci_lint

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@
2020
# tag: v0.60
2121
FROM ubuntu:18.04
2222

23+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
24+
2325
RUN apt-get update --fix-missing
2426

25-
RUN apt-get update && apt-get install -y wget git sudo make parallel
27+
RUN apt-install-and-clear -y wget git sudo make parallel
2628

2729
COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
2830
RUN bash /install/ubuntu1804_install_python.sh
2931

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

33-
RUN apt-get update && apt-get install -y doxygen graphviz curl shellcheck
35+
RUN apt-get update && apt-install-and-clear -y doxygen graphviz curl shellcheck
3436

3537
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
3638

docker/Dockerfile.ci_qemu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# tag: v0.62
2020
FROM ubuntu:18.04
2121

22+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
23+
2224
RUN apt-get update --fix-missing
2325

2426
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh

docker/Dockerfile.ci_wasm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# under the License.
1717
FROM ubuntu:18.04
1818

19+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
20+
1921
RUN apt-get update --fix-missing
2022

2123
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh

docker/Dockerfile.conda_cpu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818
FROM ubuntu:16.04
1919

20-
RUN apt-get update --fix-missing && apt-get install -y bzip2 wget sudo binutils git
20+
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
21+
22+
RUN apt-get update --fix-missing
23+
24+
RUN apt-install-and-clear -y bzip2 wget sudo binutils git
2125

2226
COPY install/ubuntu_install_conda.sh /install/ubuntu_install_conda.sh
2327
RUN bash /install/ubuntu_install_conda.sh

0 commit comments

Comments
 (0)