Skip to content

apptainer not recognized but singular command is #3860

@wintermutant

Description

@wintermutant

Snakemake version
9.14.0

Describe the bug
I was running a command: snakemake -s Snakefile example-output.txt --core 1 --use-apptainer --sdm apptainer and received an error:

WorkflowError:
The apptainer or singularity command has to be available in order to use apptainer/singularity integration.

I'm on a M4 Macbook pro and using LIMA to run apptainer. I spun up a virtual machine using Lima and called it apptainer, so I have an executable called apptainer.lima where I can run apptainer. I made a file in ~/.local/bin/apptainer that basically just ran apptainer.lima:
#!/bin/bash
apptainer.lima "$@"

I tried to run snakemake and this did not work, even after re-sourcing so my apptainer command was in my path. I then did cp ~/.local/bin/apptainer ~/.local/bin/singularity, resourced, and snakemake now recognizes the command and works.

For more context, my snakemake rule had: container: example.sif, which was in my current path.

Minimal example
If apptainer is not in your path and you have some other command to run it (like me - apptainer.lima), a singularity named executable is recognized and works for running apptainer, but apptainer command does not.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions