Skip to content

Commit 09049a5

Browse files
authored
feat(docker): update cleanup scripts (#5497)
* update cleanup scripts Signed-off-by: Yutaka Kondo <[email protected]> * revert to ubuntu-22.04 Signed-off-by: Yutaka Kondo <[email protected]> --------- Signed-off-by: Yutaka Kondo <[email protected]>
1 parent 2490899 commit 09049a5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/docker-build-and-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
6666
docker-build-and-push-cuda:
6767
needs: [load-env, docker-build-and-push]
68-
runs-on: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
68+
runs-on: ubuntu-22.04
6969
steps:
7070
- name: Check out repository
7171
uses: actions/checkout@v4

docker/scripts/cleanup_apt.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

33
function cleanup_apt() {
4-
local remove_var_lib_apt_lists=$1
5-
apt-get autoremove -y && rm -rf "$HOME"/.cache
6-
if [[ $remove_var_lib_apt_lists == true ]]; then
7-
rm -rf /var/lib/apt/lists/*
4+
local apt_clean=$1
5+
apt-get autoremove -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache
6+
if [[ $apt_clean == true ]]; then
7+
apt-get clean
88
fi
99
}
1010

docker/scripts/cleanup_system.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ function cleanup_system() {
44
local lib_dir=$1
55
local ros_distro=$2
66

7-
apt-get autoremove -y && rm -rf "$HOME"/.cache &&
8-
find /usr/lib/"$lib_dir"-linux-gnu -name "*.a" -type f -delete &&
7+
find /usr/lib/"$lib_dir"-linux-gnu -name "*.a" -type f -delete &&
98
find / -name "*.o" -type f -delete &&
109
find / -name "*.h" -type f -delete &&
1110
find / -name "*.hpp" -type f -delete &&
1211
rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \
13-
/root/.local/pipx /opt/ros/"$ros_distro"/include /etc/apt/sources.list.d/cuda*.list \
12+
/root/.local/pipx /opt/ros/"$ros_distro"/include /opt/autoware/include /etc/apt/sources.list.d/cuda*.list \
1413
/etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \
1514
/usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm*
1615
}
1716

17+
./cleanup_apt.sh
1818
cleanup_system "$@"

0 commit comments

Comments
 (0)