nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Docker builder override option cpu-shares

Open jtjvanlunenburg opened this issue 6 months ago • 3 comments

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?

jtjvanlunenburg avatar Aug 22 '24 09:08 jtjvanlunenburg