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

beeflow:useContainer support for SquashFS #990

Conversation

arhall0
Copy link
Collaborator

@arhall0 arhall0 commented Jan 17, 2025

Closes #967

Enables the use of SquashFS format for the DockerRequirement beeflow:useContainer.

I tested this by modifying the clamr example's clamr_wf.cwl file and changed the two DockerRequirements to be:

        DockerRequirement:
            beeflow:useContainer: "$WORKDIR_PATH/clamr-ffmpeg.sqfs"

Where clamr-ffmpeg.sqfs was made using the Dockerfile included with the example.

@arhall0 arhall0 added enhancement New feature or request WIP Work in progress labels Jan 17, 2025
@arhall0 arhall0 self-assigned this Jan 17, 2025
@arhall0 arhall0 force-pushed the 967-add-capability-to-run-applications-that-are-charliecloud-sqfs-format-dockerrequirement-for-tasks branch from 401c2c8 to 68c2a51 Compare January 17, 2025 22:10
@arhall0
Copy link
Collaborator Author

arhall0 commented Jan 17, 2025

I'm currently not checking if SquashFS is installed. So an error would be thrown from the job by Charliecloud and end up in the archive. I don't have a good way to check this situation.

We could throw an error earlier with something like if shutil.which('fusermount3') is None then error based on https://hpc.github.io/charliecloud/ch-run.html#image-format

@arhall0 arhall0 requested review from rstyd and pagrubel January 17, 2025 22:25
@arhall0 arhall0 removed the WIP Work in progress label Jan 17, 2025
@pagrubel
Copy link
Collaborator

I'm currently not checking if SquashFS is installed. So an error would be thrown from the job by Charliecloud and end up in the archive. I don't have a good way to check this situation.

We could throw an error earlier with something like if shutil.which('fusermount3') is None then error based on https://hpc.github.io/charliecloud/ch-run.html#image-format

Could this be tested in our github ci, I don't think we have Squash fuse installed.

@arhall0
Copy link
Collaborator Author

arhall0 commented Jan 30, 2025

Could this be tested in our github ci, I don't think we have Squash fuse installed.

I made a debug test to run in CI to see if fusermount3 is available and it seems like it is:

 =================================== FAILURES ===================================
_________________________ test_debug_check_fusermount3 _________________________

    def test_debug_check_fusermount3():
        """Debug check if system has `fusermount3`."""
>       assert shutil.which('fusermount3') is None
E       AssertionError: assert '/usr/bin/fusermount3' is None
E        +  where '/usr/bin/fusermount3' = <function which at 0x7f5cc7b41990>('fusermount3')
E        +    where <function which at 0x7f5cc7b41990> = shutil.which

beeflow/tests/test_charliecloud_driver.py:76: AssertionError

I believe fusermount3 is all that Charliecloud needs to use SquashFS for ch-run, although I could be mistaken.

@arhall0 arhall0 force-pushed the 967-add-capability-to-run-applications-that-are-charliecloud-sqfs-format-dockerrequirement-for-tasks branch from 3501a27 to ee7921d Compare January 30, 2025 16:47
@arhall0
Copy link
Collaborator Author

arhall0 commented Jan 30, 2025

Note: Unit tests failure in the CI right now seems to be when its trying to update the coverage badge. This branch is a bit out of date with develop and that seems to break that process until you merge/rebase.

@pagrubel
Copy link
Collaborator

pagrubel commented Jan 30, 2025

I think we can let Charliecloud handle what happens if the requirement for sqfs doesn't exist. I just had an error. It did it fairly well when I tried the .sqfs conatiner using the develop branch. The clamr task failed and the workflow failed due to that. I was able to find the errors in the stderr file.

@pagrubel
Copy link
Collaborator

This looks good, can you get the unit tests cleared up?

arhall0 and others added 2 commits January 31, 2025 10:14
Copy link
Collaborator

@pagrubel pagrubel left a comment

Choose a reason for hiding this comment

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

This works well and looks great. Thanks for adding the test.

@pagrubel pagrubel merged commit e3d3ee6 into develop Jan 31, 2025
@pagrubel pagrubel deleted the 967-add-capability-to-run-applications-that-are-charliecloud-sqfs-format-dockerrequirement-for-tasks branch January 31, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add capability to run applications that are Charliecloud sqfs format (DockerRequirement) for tasks
2 participants