Skip to content

Commit

Permalink
Merge branch 'master' into 2527-task-grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
bentsherman authored Jun 29, 2023
2 parents 5b8be33 + 207eb53 commit d0fe895
Show file tree
Hide file tree
Showing 32 changed files with 264 additions and 106 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ allprojects {

// Documentation required libraries
groovyDoc 'org.fusesource.jansi:jansi:1.11'
groovyDoc "org.codehaus.groovy:groovy-groovydoc:3.0.17"
groovyDoc "org.codehaus.groovy:groovy-ant:3.0.17"
groovyDoc "org.codehaus.groovy:groovy-groovydoc:3.0.18"
groovyDoc "org.codehaus.groovy:groovy-ant:3.0.18"
}

test {
Expand Down
16 changes: 11 additions & 5 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@

version ?= none

build: dist/docker
build: dist/docker/amd64
cp ../nextflow .
docker buildx build --platform linux/amd64 --output=type=docker --progress=plain --tag nextflow/nextflow:${version} .
docker buildx build --platform linux/amd64 --output=type=docker --progress=plain --tag nextflow/nextflow:${version} --build-arg TARGETPLATFORM=linux/amd64 .

build-arm: dist/docker/arm64
cp ../nextflow .
docker buildx build --platform linux/arm64 --output=type=docker --progress=plain --tag nextflow/nextflow:${version} --build-arg TARGETPLATFORM=linux/arm64 .

release: build
docker tag nextflow/nextflow:${version} nextflow/nextflow:latest
Expand All @@ -35,9 +39,11 @@ release: build
# MacOS: https://download.docker.com/mac/static
# Windows: https://download.docker.com/win/static

dist/docker:
dist/docker/amd64:
mkdir -p dist/linux/amd64
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz | tar --strip-components=1 -xvz -C dist/linux/amd64
# mkdir -p dist/linux/arm64
# curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-17.09.0-ce.tgz | tar --strip-components=1 -xvz -C dist/linux/arm64

dist/docker/arm64:
mkdir -p dist/linux/arm64
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-17.09.0-ce.tgz | tar --strip-components=1 -xvz -C dist/linux/arm64

10 changes: 8 additions & 2 deletions docs/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,15 @@ The private registry is an addition, not a replacement, to the existing configur
:::{note}
When using containers hosted in a private registry, the registry name must also be provided in the container name specified via the {ref}`container <process-container>` directive using the format: `[server]/[your-organization]/[your-image]:[tag]`. Read more about fully qualified image names in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/pull/#pull-from-a-different-registry).
:::

### Virtual Network

:::{versionadded} 23.03.0-edge
:::

Sometimes it might be useful to create a pool in an existing [Virtual Network](https://learn.microsoft.com/en-us/azure/virtual-network/). To do so, the
Sometimes it might be useful to create a pool in an existing [Virtual Network](https://learn.microsoft.com/en-us/azure/virtual-network/). To do so, the
`virtualNetwork` option can be added to the pool settings as follows:

```groovy
azure {
batch {
Expand All @@ -356,12 +358,16 @@ azure {
}
}
```

The value of the setting must be the identifier of a subnet available in the virtual network to join. A valid subnet ID has the following form:

`/subscriptions/<YOUR SUBSCRIPTION ID>/resourceGroups/<YOUR RESOURCE GROUP NAME>/providers/Microsoft.Network/virtualNetworks/<YOUR VIRTUAL NETWORK NAME>/subnets/<YOUR SUBNET NAME>`
```
/subscriptions/<YOUR SUBSCRIPTION ID>/resourceGroups/<YOUR RESOURCE GROUP NAME>/providers/Microsoft.Network/virtualNetworks/<YOUR VIRTUAL NETWORK NAME>/subnets/<YOUR SUBNET NAME>
```

:::{warning}
Batch Authentication with Shared Keys does not allow to link external resources (like Virtual Networks) to the pool. Therefore, Active Directory Authentication must be used in conjunction with the `virtualNetwork` setting.
:::

## Active Directory Authentication

Expand Down
8 changes: 8 additions & 0 deletions docs/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Unlike Docker, Nextflow does not automatically mount host paths in the container
When a process input is a *symbolic link* file, make sure the linked file is stored in a host folder that is accessible from a bind path defined in your Apptainer installation. Otherwise the process execution will fail because the launched container won't be able to access the linked file.
:::

:::{versionchanged} 22.07.0-edge
Nextflow no longer mounts the home directory when launching an Apptainer container. To re-enable the old behavior, set the environment variable `NXF_APPTAINER_HOME_MOUNT` to `true`.
:::

### Multiple containers

It is possible to specify a different Apptainer image for each process definition in your pipeline script. For example, let's suppose you have two processes named `foo` and `bar`. You can specify two different Apptainer images specifying them in the `nextflow.config` file as shown below::
Expand Down Expand Up @@ -575,6 +579,10 @@ Unlike Docker, Nextflow does not automatically mount host paths in the container
When a process input is a *symbolic link* file, make sure the linked file is stored in a host folder that is accessible from a bind path defined in your Singularity installation. Otherwise the process execution will fail because the launched container won't be able to access the linked file.
:::

:::{versionchanged} 22.07.0-edge
Nextflow no longer mounts the home directory when launching a Singularity container. To re-enable the old behavior, set the environment variable `NXF_SINGULARITY_HOME_MOUNT` to `true`.
:::

### Multiple containers

It is possible to specify a different Singularity image for each process definition in your pipeline script. For example, let's suppose you have two processes named `foo` and `bar`. You can specify two different Singularity images specifying them in the `nextflow.config` file as shown below:
Expand Down
2 changes: 1 addition & 1 deletion docs/fusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ nextflow run <YOUR PIPELINE> -work-dir s3://<YOUR BUCKET>/scratch

## NVMe storage

The Fusion file system implements a lazy download and upload algorithm that runs in the background to transfer files in parallel to and from object storage into a container-local temporary folder. This means that the performance of the temporary folder inside the container (`/tmp` in a default setup) is key to acheiving maximum performance.
The Fusion file system implements a lazy download and upload algorithm that runs in the background to transfer files in parallel to and from object storage into a container-local temporary folder. This means that the performance of the temporary folder inside the container (`/tmp` in a default setup) is key to achieving maximum performance.

The temporary folder is used only as a temporary cache, so the size of the volume can be much lower than the actual needs of your pipeline processes. Fusion has a built-in garbage collector that constantly monitors remaining disk space on the temporary folder and immediately evicts old cached entries when necessary.

Expand Down
4 changes: 2 additions & 2 deletions docs/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ result = 15
```

:::{tip}
A common use case for this operator is to use the first paramter as an accumulator and the second parameter as the `i-th` item to be processed.
A common use case for this operator is to use the first parameter as an accumulator and the second parameter as the `i-th` item to be processed.
:::

Optionally you can specify an initial value for the accumulator as shown below:
Expand Down Expand Up @@ -1705,7 +1705,7 @@ Available options:
: The index of the element to split when the operator is applied to a channel emitting list/tuple objects (default: first file object or first element).

`file`
: When `true` saves each split to a file. Use a string instead of `true` value to create split files with a specific name (split index number is automatically added). Finally, set this attribute to an existing directory, in oder to save the split files into the specified folder.
: When `true` saves each split to a file. Use a string instead of `true` value to create split files with a specific name (split index number is automatically added). Finally, set this attribute to an existing directory, in order to save the split files into the specified folder.

`keepHeader`
: Parses the first line as header and prepends it to each emitted chunk.
Expand Down
7 changes: 4 additions & 3 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,10 @@ This directive is only used by certain executors. Refer to the {ref}`executor-pa
:::{note}
The accelerator `type` option depends on the target execution platform. Refer to the platform-specific documentation for details on the available accelerators:

- [AWS](https://aws.amazon.com/batch/faqs/?#GPU_Scheduling_)
- [Google Cloud](https://cloud.google.com/compute/docs/gpus/)
- [Kubernetes](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/#clusters-containing-different-types-of-gpus)

The accelerator `type` option is not supported for AWS Batch. You can control the accelerator type indirectly through the allowed instance types in your Compute Environment. See the [AWS Batch FAQs](https://aws.amazon.com/batch/faqs/?#GPU_Scheduling_) for more information.
:::

(process-afterscript)=
Expand Down Expand Up @@ -1333,7 +1334,7 @@ process foo {

Multiple packages can be specified separating them with a blank space e.g. `bwa=0.7.15 fastqc=0.11.5`. The name of the channel from where a specific package needs to be downloaded can be specified using the usual Conda notation i.e. prefixing the package with the channel name as shown here `bioconda::bwa=0.7.15`.

The `conda` directory also allows the specification of a Conda environment file path or the path of an existing environment directory. See the {ref}`conda-page` page for further details.
The `conda` directive also allows the specification of a Conda environment file path or the path of an existing environment directory. See the {ref}`conda-page` page for further details.

(process-container)=

Expand Down Expand Up @@ -2112,7 +2113,7 @@ Available options:

### queue

The `queue` directory allows you to set the `queue` where jobs are scheduled when using a grid based executor in your pipeline. For example:
The `queue` directive allows you to set the `queue` where jobs are scheduled when using a grid based executor in your pipeline. For example:

```groovy
process grid_job {
Expand Down
2 changes: 1 addition & 1 deletion docs/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ The following functions are available in Nextflow scripts:
`file( filePattern, options = [:] )`
: Get one or more files from a path or glob pattern. Returns a [Path](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Path.html) or list of Paths if there are multiple files. See [Files and I/O](#files-and-io).

`files( filePatten, options = [:] )`
`files( filePattern, options = [:] )`
: Convenience method for `file()` that always returns a list.

`groupKey( key, size )`
Expand Down
14 changes: 7 additions & 7 deletions modules/nextflow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ compileGroovy {
dependencies {
api(project(':nf-commons'))
api(project(':nf-httpfs'))
api "org.codehaus.groovy:groovy:3.0.17"
api "org.codehaus.groovy:groovy-nio:3.0.17"
api "org.codehaus.groovy:groovy-xml:3.0.17"
api "org.codehaus.groovy:groovy-json:3.0.17"
api "org.codehaus.groovy:groovy-templates:3.0.17"
api "org.codehaus.groovy:groovy-yaml:3.0.17"
api "org.codehaus.groovy:groovy:3.0.18"
api "org.codehaus.groovy:groovy-nio:3.0.18"
api "org.codehaus.groovy:groovy-xml:3.0.18"
api "org.codehaus.groovy:groovy-json:3.0.18"
api "org.codehaus.groovy:groovy-templates:3.0.18"
api "org.codehaus.groovy:groovy-yaml:3.0.18"
api "org.slf4j:jcl-over-slf4j:2.0.7"
api "org.slf4j:jul-to-slf4j:2.0.7"
api "org.slf4j:log4j-over-slf4j:2.0.7"
Expand All @@ -48,7 +48,7 @@ dependencies {
testImplementation 'org.subethamail:subethasmtp:3.1.7'

// test configuration
testFixturesApi ("org.codehaus.groovy:groovy-test:3.0.17") { exclude group: 'org.codehaus.groovy' }
testFixturesApi ("org.codehaus.groovy:groovy-test:3.0.18") { exclude group: 'org.codehaus.groovy' }
testFixturesApi ("cglib:cglib-nodep:3.3.0")
testFixturesApi ("org.objenesis:objenesis:3.2")
testFixturesApi ("org.spockframework:spock-core:2.3-groovy-3.0") { exclude group: 'org.codehaus.groovy'; exclude group: 'net.bytebuddy' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,20 @@ class SingularityBuilder extends ContainerBuilder<SingularityBuilder> {

private boolean autoMounts

private boolean homeMount

private boolean newPidNamespace

SingularityBuilder(String name) {
this.image = name
this.homeMount = defaultHomeMount()
this.newPidNamespace = defaultNewPidNamespace()
}

private boolean defaultHomeMount() {
SysEnv.get("NXF_${getBinaryName().toUpperCase()}_HOME_MOUNT", 'false').toString() == 'true'
}

private boolean defaultNewPidNamespace() {
SysEnv.get("NXF_${getBinaryName().toUpperCase()}_NEW_PID_NAMESPACE", 'true').toString() == 'true'
}
Expand Down Expand Up @@ -92,6 +99,9 @@ class SingularityBuilder extends ContainerBuilder<SingularityBuilder> {

result << 'exec '

if( !homeMount )
result << '--no-home '

if( newPidNamespace )
result << '--pid '

Expand Down
Loading

0 comments on commit d0fe895

Please sign in to comment.