Skip to content

Attempt to speed up Docker image creation#14874

Open
mhucka wants to merge 6 commits intogoogle:masterfrom
mhucka:cirq-revise-dockerfile
Open

Attempt to speed up Docker image creation#14874
mhucka wants to merge 6 commits intogoogle:masterfrom
mhucka:cirq-revise-dockerfile

Conversation

@mhucka
Copy link

@mhucka mhucka commented Feb 2, 2026

Changes:

  • Remove apt installation of packages because they are not needed for fuzzing.

  • Combine separate RUN steps into one, where possible.

  • Add --mount=type=cache flags in the hopes that you change a requirement previously downloaded .deb files are reused rather than re-downloaded from the internet.

  • Silence irrelevant pip warnings about installing in system directories.

Changes:

* Combine `apt-get update` and `apt-get install` into a single `RUN`,
  for greater efficiency.

* Skip installing `apt-system-requirements.txt` because they shouldn't
  be needed for fuzzing.

* Replace `cat` with `grep -vhE '^#|^$'` to strip comments and blank
  lines before sending requirements to `apt-get install`

* Add `--mount=type=cache` flags in the hopes that you change a
  requirement previously downloaded `.deb` files are reused rather than
  re-downloaded from the internet.

* Silence irrelevant pip warnings about installing in system directories.
Fix copy-paste error.
@mhucka mhucka marked this pull request as ready for review February 2, 2026 22:30
I just realized that the packages this was installing via apt are not
necessary for the fuzzing procedure.
Removeo more things that I had added when configuring the apt
installation earlier.
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.

1 participant