Skip to content

Commit 5d0edab

Browse files
committed
Add a step to delete unused things in GH's images
1 parent ad65c27 commit 5d0edab

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/container_images.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,46 @@ jobs:
4343
image: "rust-gpu/rust-cuda-rockylinux9-cuda12"
4444
dockerfile: ./container/rockylinux9-cuda12/Dockerfile
4545
steps:
46+
- name: Free up space
47+
run: |
48+
df -h
49+
50+
# Remove Java
51+
sudo rm -rf /usr/lib/jvm
52+
53+
# Remove .NET
54+
sudo rm -rf /usr/share/dotnet
55+
56+
# Remove Swift
57+
sudo rm -rf /usr/share/swift
58+
59+
# Remove Haskell
60+
sudo rm -rf /usr/local/.ghcup
61+
62+
# Remove Julia
63+
sudo rm -rf /usr/local/julia*
64+
65+
# Remove Android SDKs
66+
sudo rm -rf /usr/local/lib/android
67+
68+
# Remove Chromium
69+
sudo rm -rf /usr/local/share/chromium
70+
71+
# Remove Microsoft/Edge and Google Chrome builds
72+
sudo rm -rf /opt/microsoft /opt/google
73+
74+
# Remove Azure CLI
75+
sudo rm -rf /opt/az
76+
77+
# Remove PowerShell
78+
sudo rm -rf /usr/local/share/powershell
79+
80+
# Remove CodeQL and other toolcaches
81+
sudo rm -rf /opt/hostedtoolcache
82+
83+
docker system prune -af || true
84+
docker builder prune -af || true
85+
df -h
4686
- name: Checkout repository
4787
uses: actions/checkout@v4
4888
- name: Validate platform

0 commit comments

Comments
 (0)