Skip to content

[Buildbot] Add script for setting up environment for debug/reproduction - #2278

Open
Kewen12 wants to merge 3 commits into
aomp-devfrom
add-dev-script
Open

[Buildbot] Add script for setting up environment for debug/reproduction#2278
Kewen12 wants to merge 3 commits into
aomp-devfrom
add-dev-script

Conversation

@Kewen12

@Kewen12 Kewen12 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

This PR provides a script to help developers quickly set up a local environment for debugging or reproducing issues surfaced by our upstream buildbots. Updated readme for detailed instructions.

This script:

  • Pulls the Rock manylinux Dockerfile and the necessary files for building the base image;
  • Builds the same images that our buildbot run, based on the base image;
  • Creates and run the container;
  • Clean up the container and images;
  • Supports flexible use cases.

Tested locally.

@jplehr jplehr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together!

I think it would be great if a user could point to a local LLVM tree and then have that mounted into the container as a volume mount. This reduces the need for re-cloning.

The other question that I had: Do these docker commands that the script uses require a certain docker version to be available?

@Kewen12

Kewen12 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for putting this together!

I think it would be great if a user could point to a local LLVM tree and then have that mounted into the container as a volume mount. This reduces the need for re-cloning.

Good idea! I added a new flag --llvm-src to support the mounting.

The other question that I had: Do these docker commands that the script uses require a certain docker version to be available?

The docker cmds and options are fundamental which should be available for the versions widely used. So I think we don't have to enforce the version here.

Comment thread upstream-buildbots/README.md
Comment thread upstream-buildbots/README.md
Comment thread upstream-buildbots/README.md Outdated
Comment thread upstream-buildbots/run.py Outdated
Comment thread upstream-buildbots/run.py Outdated
Comment thread upstream-buildbots/run.py Outdated
Comment thread upstream-buildbots/run.py Outdated
Comment thread upstream-buildbots/run.py
name = container_name(args, args.target)

log(f"Removing container {name}")
run_cmd(["docker", "rm", "-f", name], check=False)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check if the docker exists first?
This fails when the container is still running, right?

Comment thread upstream-buildbots/run.py Outdated
@Kewen12

Kewen12 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

The revision has the following changes to address comment feedback:

  • Added --rebuild-base to force rebuilding base image;
  • Added logic to generate unique container name by default;
  • Updated README for UID/GID: no UID/GID remapping, bind mount preserves host ownership;
  • Added --clean-all option to clean container and image;
  • Renamed functions and variables;
  • Removed comments.

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.

2 participants