Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label docker artifacts for easy removal and reference #775

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

javiermtorres
Copy link
Contributor

@javiermtorres javiermtorres commented Jan 30, 2025

What's changing

This PR adds a label ai.mozilla.product_name=lumigator to volumes and containers for easy reference (mainly cleanup). Cleanup make targets use this label to delete the right containers and volumes.

Closes #757

How to test it

Using make clean-docker-containers should remove only Lumigator containers, no other containers that the user may have.

Additional notes for reviewers

N/A

I already...

  • Tested the changes in a working environment to ensure they work as expected
  • Added some tests for any new functionality
  • Updated the documentation (both comments in code and product documentation under /docs)
  • Checked if a (backend) DB migration step was required and included it if required
    • No DB changes

@javiermtorres javiermtorres marked this pull request as ready for review February 3, 2025 14:51
@agpituk
Copy link
Contributor

agpituk commented Feb 5, 2025

Can't make it work currently @javiermtorres. I started from a clean slate , did a docker system prune -a then, using this branch, make start-lumigator. Then make stop-lumigator. Cleaning containers gives me the following errors afterwards:

➜  lumigator git:(javiermtorres/issue-757-label-docker-artifacts) ✗ make clean-docker-all 
RAY_WORKER_GPUS = 0
docker container prune --filter=ai.mozilla.product_name=lumigator



WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Error response from daemon: invalid filter 'ai.mozilla.product_name'
make: *** [clean-docker-containers] Error 1
➜  lumigator git:(javiermtorres/issue-757-label-docker-artifacts) ✗ make clean-docker-containers
RAY_WORKER_GPUS = 0
docker container prune --filter=ai.mozilla.product_name=lumigator
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Error response from daemon: invalid filter 'ai.mozilla.product_name'
make: *** [clean-docker-containers] Error 1

Could it be that we need to do it like this? docker container prune --filter "label=ai.mozilla.product_name=lumigator"

@javiermtorres
Copy link
Contributor Author

Could it be that we need to do it like this? docker container prune --filter "label=ai.mozilla.product_name=lumigator"

I maye have not pushed the latest state, let me check :-/

@javiermtorres
Copy link
Contributor Author

I remember having checked the syntax, but somehow I didn't add it to the Makefile :-/ My apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Label docker artifacts for proper cleanup
2 participants