nextflow-go is a Go-based alternative to the nextflow kuberun command, designed to address several limitations of the original kuberun driver. These limitations include:
- Incompatibility with
nextflow.configfiles that contain functions (e.g.,def check_resource(obj)). - Problems handling multiline strings (e.g.,
beforeText = """). - Inability to pass custom command-line arguments not compiled into the
nextflowdriver.
As a statically compiled Go binary, nextflow-go requires only the LibC library from Ubuntu 22.04 or later. A precompiled x86_64 binary is available in the bin folder.
- Full CLI Argument Support: Arbitrary command-line arguments are passed directly to
nextflow runwithout modification. - Minimal Config Changes: The tool only modifies the
k8ssection ofnextflow.config, ensuring full compatibility with custom functions, multiline strings, and future additions. - No Shared Storage Required: You can run
nextflow-gofrom a local machine without shared storage access. The only requirement is a working Kubernetes configuration (kubeconfig) -- refer to the Cerit-SC Kubernetes documentation.
nextflow-go run [arguments]The following options are currently supported (mirroring the original kuberun functionality). All options are optional:
-
-v pvc:dir
Mounts a Persistent Volume Claim (pvc) into the specifieddirin both the launcher and worker pods. Can be specified multiple times. -
-head-image,-pod-image
Specifies the container image for the driver pod. Defaults tocerit.io/nextflow/nextflow:24.10.5. -
-head-cpus
Sets the CPU limit for the driver pod. Default is1(requests are set to half). -
-head-memory
Sets the memory limit for the driver pod. Default is8Gi. -
-head-prescript
This option is currently ignored. -
-C
Specifies the main configuration file. Defaults tonextflow.configin the current directory. -
-c
Specifies a custom configuration file. -
-params-file
Provides an additional parameters file. -
-name
Sets a custom name for the run. If not provided, a random name will be generated.
If the nextflow.config does not define the computeResourceType, the launcher defaults to using the Job compute type.
The tool does not parse C/C++ style block comments (/* ... */) around the k8s section. It does support line comments using //.
For example, in the configuration below, the first k8s block will still be used, even though it is inside a block comment. This behavior may lead to unexpected results:
/*
k8s {
namespace = 'my-namespace'
runAsUser = 1000
computeResourceType = 'Job'
pullPolicy = 'IfNotPresent'
launchDir = '/tmp/x'
}*/
k8s {
namespace = 'other-namespace'
runAsUser = 1000
computeResourceType = 'Job'
pullPolicy = 'IfNotPresent'
launchDir = '/tmp/x'
}