Skip to content

Commit

Permalink
Add prune target to cleanup wasted containers/storage
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rhatdan committed May 2, 2024
1 parent f9a9998 commit 3cc034b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions training/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 3cc034b

Please sign in to comment.