Skip to content

Conversation

@EduarteXD
Copy link

Please see replicate/cog#1656

- name: Set up Docker buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
with:
use: 'false'
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member

Choose a reason for hiding this comment

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

@EduarteXD I see this:

https://github.com/docker/setup-buildx-action/blob/5138f76647652447004da686b2411557eaf65f33/README.md#L97

Screenshot 2024-05-21 at 09 22 43@2x

.. but I don't know enough about how Docker or buildx works to know what "Switch to this builder instance" means or what effect it might have.

Copy link
Author

Choose a reason for hiding this comment

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

In buildx, the --use parameter is used to specify an existing builder.

In the setup-buildx-action script, passing use: true will make each build step use a new builder instance, each builder has its own context, cache, and storage space.

Therefore, the artifacts (such as intermediate layer cache, final images, etc.) between different builders are isolated by default and cannot directly access each other’s artifacts.

In each step of the cog's build, it is necessary to use --load to directly load the built image into the Docker engine, which can take a considerable amount of time.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha! Thanks for explaining in detail. I can set up a test workflow that combines this change plus replicate/cog#1656 and see how it goes. If everything is smooth I'll merge and ship these changes.

@zeke
Copy link
Member

zeke commented Jun 17, 2024

Hey @EduarteXD I finally got around to taking this for a spin. Using this code which points at your commit:

      - name: Setup Cog
        uses: replicate/setup-cog@e32d261202c6a889366ad06f0cfff72fd825e7c5

I got this error in my Actions run:

Screenshot 2024-06-17 at 13 57 11@2x

Any idea what that might be about? Were you successfully able to configure use for your own needs?

@EduarteXD
Copy link
Author

EduarteXD commented Jun 18, 2024

Hey @EduarteXD I finally got around to taking this for a spin. Using this code which points at your commit:

      - name: Setup Cog
        uses: replicate/setup-cog@e32d261202c6a889366ad06f0cfff72fd825e7c5

I got this error in my Actions run:

Screenshot 2024-06-17 at 13 57 11@2x

Any idea what that might be about? Were you successfully able to configure use for your own needs?

https://github.com/aicapcut/cog-test/actions/runs/9560733957/job/26353447883

the workflow file

@zeke I think this error is related to the "Free disk space" step. When I do not run this step, the action can be completed successfully.

image

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.

3 participants