Skip to content

GitHub Actions test failing due to space on device #448

@agitter

Description

@agitter

When running Singularity tests, GitHub Actions is running out of storage space. For instance:

name = 'Omics Integrator 2', container_suffix = 'omics-integrator-2:v3'
command = ['OmicsIntegrator', '-e', '/spras/OKOBMNQ/oi2-edges.txt', '-p', '/spras/TBS74TX/oi2-prizes.txt', '-o', ...]
volumes = [(PosixPath('/home/runner/work/spras/spras/test/OmicsIntegrator2/input/simple'), PurePosixPath('/spras/OKOBMNQ')), (Po...')), (PosixPath('/home/runner/work/spras/spras/test/OmicsIntegrator2/output'), PurePosixPath('/spras/YOVSKYM/output'))]
working_dir = '/spras', out_dir = PosixPath('test/OmicsIntegrator2/output')
container_settings = ProcessedContainerSettings(framework=<ContainerFramework.singularity: 'singularity'>, unpack_singularity=False, prefix='docker.io/reedcompbio', enable_profiling=False, hash_length=7)
environment = {'SPRAS': 'True'}, network_disabled = True

    def run_container_and_log(name: str, container_suffix: str, command: List[str], volumes: List[Tuple[PurePath, PurePath]], working_dir: str, out_dir: str | os.PathLike, container_settings: ProcessedContainerSettings, environment: Optional[dict[str, str]] = None, network_disabled=False):
        """
        Runs a command in the container using Singularity or Docker with associated pretty printed messages.
        @param name: the display name of the running container for logging purposes
        @param container_suffix: name of the DockerHub container without the 'docker://' prefix
        @param command: command to run in the container
        @param volumes: a list of volumes to mount where each item is a (source, destination) tuple
        @param working_dir: the working directory in the container
        @param container_settings: the container settings to use
        @param environment: environment variables to set in the container
        @param network_disabled: Disables the network on the container. Only works for docker for now. This acts as a 'runtime assertion' that a container works w/o networking.
        @return: output from Singularity execute or Docker run
        """
        if not environment:
            environment = {'SPRAS': 'True'}
    
        print('Running {} on container framework "{}" on env {} with command: {}'.format(name, container_settings.framework, list(env_to_items(environment)), ' '.join(command)), flush=True)
        try:
            out = run_container(container_suffix=container_suffix, command=command, volumes=volumes, working_dir=working_dir, out_dir=out_dir, container_settings=container_settings, environment=environment, network_disabled=network_disabled)
            if out is not None:
                if isinstance(out, list):
                    out = ''.join(out)
                elif isinstance(out, dict):
                    if 'message' in out:
                        # This is the format of a singularity message.
                        # See https://singularityhub.github.io/singularity-cli/api/source/spython.main.html?highlight=execute#spython.main.execute.execute.
                        exit_status = int(out['return_code']) if 'return_code' in out else 0
                        out = ''.join(out['message'])
                        if exit_status != 0:
                            message = f'An unexpected non-zero exit status ({exit_status}) occurred while running this singularity container:\n' + indent(out)
>                           raise ContainerError(message, exit_status, out, None)
E                           spras.containers.ContainerError: An unexpected non-zero exit status (255) occurred while running this singularity container:
E                               INFO:    Converting OCI blobs to SIF format
E                               INFO:    Starting build...
E                               Copying blob sha256:852e50cd189dfeb54d97680d9fa6bed21a6d7d18cfb56d6abfe2de9d7f173795
E                               Copying blob sha256:a6236801494d5ca9acfae6569427398c2942c031375b96cac887cafe1de5a09b
E                               Copying blob sha256:cc956bd2ce1f44f7033139796cf30c877018c9ba3efc93babde8447b55d6b892
E                               Copying blob sha256:679c171d6942954a759f2d3a1dff911321940f23b0cdbe1d186f36bef0025124
E                               Copying blob sha256:acd2b0bdc10f8443cbcf45a63eac42b00682f18d944b637d3fdb822cf68c8e5d
E                               Copying blob sha256:827fd4a8220d31400cc8edb3a6ad3584ab8842b352156de48e0ca10e2626ea3a
E                               Copying blob sha256:b15df90cfab843338193957f2a2758bbdecaada1c0ea4461b7ec847dbfaff55c
E                               Copying config sha256:e41a8f8ad3516e4408757faa226eaf4b060e0f16f7189bd8dcae4ceea7cb82bb
E                               Writing manifest to image destination
E                               2025/12/05 22:28:57  info unpack layer: sha256:852e50cd189dfeb54d97680d9fa6bed21a6d7d18cfb56d6abfe2de9d7f173795
E                               2025/12/05 22:28:58  info unpack layer: sha256:a6236801494d5ca9acfae6569427398c2942c031375b96cac887cafe1de5a09b
E                               2025/12/05 22:28:59  info unpack layer: sha256:679c171d6942954a759f2d3a1dff911321940f23b0cdbe1d186f36bef0025124
E                               2025/12/05 22:29:01  info unpack layer: sha256:acd2b0bdc10f8443cbcf45a63eac42b00682f18d944b637d3fdb822cf68c8e5d
E                               2025/12/05 22:29:01  info unpack layer: sha256:827fd4a8220d31400cc8edb3a6ad3584ab8842b352156de48e0ca10e2626ea3a
E                               2025/12/05 22:29:02  info unpack layer: sha256:cc956bd2ce1f44f7033139796cf30c877018c9ba3efc93babde8447b55d6b892
E                               2025/12/05 22:29:02  info unpack layer: sha256:b15df90cfab843338193957f2a2758bbdecaada1c0ea4461b7ec847dbfaff55c
E                               INFO:    Creating SIF file...
E                               FATAL:   Unable to handle docker://docker.io/reedcompbio/omics-integrator-2:v3 uri: while building SIF from layers: while creating SIF: while creating container: write /home/runner/.apptainer/cache/oci-tmp/tmp_59265987: copy_file_range: no space left on device

spras/containers.py:234: ContainerError

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions