nextflow
nextflow copied to clipboard
Docker builder override option cpu-shares
Nextflow Docker builder (DockerBuilder.groovy) generates a .command.run script that appears to hardcode the option --cpu-shares
of the docker run command. My environment has the following cgroup restriction:
docker run hello-world
works
docker run --cpu-shares 1024 hello-world
does not work due to cgroupv2 error
Specifically the error is:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: cannot enter cgroupv2 "/sys/fs/cgroup/docker" with domain controllers -- it is in an invalid state: unknown.
My solution is to remove the --cpu-shares flag generated in nextflow, is this possible in the config, e.g. by picking a value of 0 for cpus somewhere? Or would it require a custom nextflow build?