Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 5, 2025

  • Mount the host's root under /host/root so it's visible in the containers.
  • Remove stuff we don't need to free lots of disk space.
  • While we're at it, arrange for the commands (copied from OSL) that allow the containers to see a CPU, when available.

This is freeing 20+ GB!

@lgritz lgritz requested a review from jfpanisset December 5, 2025 23:15
- Mount the host's root under /host/root so it's visible in the
  containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
  allow the containers to see a CPU, when available.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link

@jfpanisset jfpanisset left a comment

Choose a reason for hiding this comment

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

LGTM, hope it works for you!

image: ${{ inputs.container }}
volumes: ${{ fromJson( inputs.container_volumes ) }}
options: -v /:/host/root ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }}
# Extra options:

Choose a reason for hiding this comment

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

Not used this conditional syntax before, I'm guessing that the || '-e A=x' part just sets an innocuous env var A=x since you can't have an empty "else" part of the conditional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so. That part is just ported from OSL and is what I needed to make it work.

@jfpanisset
Copy link

Also note that on a system where the container image store is on a different filesystem than the root filesystem, running df -h . will show the amount of space on that device, whereas df -h /host/root will show the space on the root filesystem.

Of course we only care about freeing up disk space on the same filesystem as where the container image is stored, and this is a Ubuntu GHA runner specific hack anyway.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
Copy link
Collaborator Author

lgritz commented Dec 6, 2025

I think they're the same, but I fixed anyway.

@lgritz lgritz added the build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. label Dec 6, 2025
@lgritz lgritz merged commit 2d5e442 into AcademySoftwareFoundation:main Dec 6, 2025
32 checks passed
@jfpanisset
Copy link

I was able to shave around 1.3GB from the images and have re-released ci-oiio 2024.5 / 2025.4 / 2026.2 and here are the results:

                Before   Before    After    After
                Docker   On Disk    Docker    On Disk
                Hub                          Hub
- 2024.5 5.46GB / 12.5GB -> 4.09GB / 11.0GB
- 2025.4 5.67GB / 13.0GB -> 4.19GB / 11.4GB
- 2026.2 7.01GB / 15.6GB -> 5.32GB / 13.8GB

This should hopefully allow the ci-oiio:2026 image to get pulled an expanded on a free runner with 14GB of free disk space.

@lgritz
Copy link
Collaborator Author

lgritz commented Dec 7, 2025

Thanks, @jfpanisset. I believe I will need the same for ci-osl

@jfpanisset
Copy link

All 2024.5 / 2025.4 / 2026.2 images have been re-released with the spurious Conan download cache purged.

@lgritz lgritz deleted the lg-disk branch December 17, 2025 07:18
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 17, 2025
…n#4974)

- Mount the host's root under /host/root so it's visible in the
containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
allow the containers to see a CPU, when available.

This is freeing 20+ GB!

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 31, 2025
…n#4974)

- Mount the host's root under /host/root so it's visible in the
containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
allow the containers to see a CPU, when available.

This is freeing 20+ GB!

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 31, 2025
…n#4974)

- Mount the host's root under /host/root so it's visible in the
containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
allow the containers to see a CPU, when available.

This is freeing 20+ GB!

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 31, 2025
…n#4974)

- Mount the host's root under /host/root so it's visible in the
containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
allow the containers to see a CPU, when available.

This is freeing 20+ GB!

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 31, 2025
…n#4974)

- Mount the host's root under /host/root so it's visible in the
containers.
- Remove stuff we don't need to free lots of disk space.
- While we're at it, arrange for the commands (copied from OSL) that
allow the containers to see a CPU, when available.

This is freeing 20+ GB!

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants