Can I put variable in configuration file (for backend)

Hello everyone.

In my user case, I would like to use Singularity container software with WDL scripts via Cromwell.
I want to know if it is possible to put variable in my cromwell configuation file ?

I mean, in the following configuration :

backend {
    default = "Singularity"
    providers {
        Singularity { 
            actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
            config {
                run-in-background = true
                runtime-attributes = """
                String? singularity_img = "/path/to/singularity/img"
                """
                submit = "singularity exec ${singularity_img} /bin/bash < ${script}"
            }
        }
    }
}

Is it possible to replace singularity_img variable by string present in WDL script or Workflowinput file ? or by another way?

Thanks

Tagged:

Best Answers

  • Accepted Answer

    I tried to replace
    String? singularity = "/path/to/singularity/img"
    by
    String? singularity
    and put these lines in my WDL script :
    runtime {
    singularity: "/path/to/singularity/img"
    }

    but it don't works, I have this error message :

    Unrecognized runtime attribute keys: singularity

  • Accepted Answer

    Hey, actually it works very well after my second post (with runtime) with API.
    thanks :)

Answers

Sign In or Register to comment.