From 3cc034b4be3156d96db2559aaab2a256379e0369 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 2 May 2024 13:21:19 -0400 Subject: [PATCH] Add prune target to cleanup wasted containers/storage We are seeing lots of users running out of disk space. The target should help free up wasted space, but be carefull no builds are running when you execute the command. Signed-off-by: Daniel J Walsh --- training/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/training/Makefile b/training/Makefile index abe16502..ae4a7715 100644 --- a/training/Makefile +++ b/training/Makefile @@ -25,6 +25,10 @@ help: @echo " - make cloud-intel" @echo " - make cloud-nvidia" @echo " - make cloud-vllm" + @echo + @echo "Make prune. This command will remove all buildah containers if left behind from podman build and then prune all unused container images. Usefull if you are running out of space." + @echo + @echo " - make prune" # # Create instructlab AI container images @@ -77,5 +81,14 @@ cloud-nvidia: .PHONY: cloud: cloud-amd cloud-intel cloud +# +# We often see users running out of space. These commands are useful for freeing wasted space. +# Note becarful to not run this target if a podman build is in progress. +# +.PHONY: prune +prune: + buildah rm --all + podman image prune -f + clean: rm -rf build