Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave with Docker and Spack #4940

Draft
wants to merge 73 commits into
base: wave
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9db4c91
build: Add wave
edmundmiller Oct 17, 2023
fe7665f
build: Set strategy to dockerfile, conda then container
edmundmiller Oct 17, 2023
59d3019
refactor: Remove container
edmundmiller Oct 17, 2023
67c62bd
build: Add a repo to push to
edmundmiller Oct 17, 2023
f1d8649
ci(wave): Add wave build
edmundmiller Nov 2, 2023
5415a42
ci(wave): Switch to all_changed_files
edmundmiller Nov 2, 2023
36414d1
ci(wave): Only look for envronment.ymls
edmundmiller Nov 2, 2023
25957b2
dummy: Change env
edmundmiller Nov 2, 2023
5d3f4f1
ci(wave): Remove raw format
edmundmiller Nov 2, 2023
c79eb65
ci(wave): Try a bunch of different things at once
edmundmiller Nov 2, 2023
fac96ce
ci(wave): Remove redundant fromJson and wrap in an array
edmundmiller Nov 2, 2023
fc0121d
ci(wave): I have no idea what I'm doing
edmundmiller Nov 2, 2023
5d875d7
ci(wave): Wrap it
edmundmiller Nov 2, 2023
e0ce27d
ci(wave): Found an example
edmundmiller Nov 2, 2023
5d37376
ci(wave): Maybe quotes?
edmundmiller Nov 2, 2023
0073c28
ci(wave): That'll do it
edmundmiller Nov 2, 2023
5ead848
ci(wave): Fix wave install
edmundmiller Nov 2, 2023
1e89bff
ci(wave): Hard code an image
edmundmiller Nov 2, 2023
ea9ab86
ci(wave): Add secrets
edmundmiller Nov 2, 2023
8571bc9
feat: Try a different files structure
edmundmiller Nov 3, 2023
d6ef54a
ci(wave): First stab at building singularity images
edmundmiller Nov 3, 2023
6a4af4d
fixup! feat: Try a different files structure
edmundmiller Nov 3, 2023
5410b46
ci(wave): Add profile to matrix
edmundmiller Nov 3, 2023
1090212
ci(wave): Give up on fancy substitution
edmundmiller Nov 3, 2023
a3bf363
ci(wave): Add await
edmundmiller Nov 3, 2023
a3fa9d0
ci(wave): Switch to quay
edmundmiller Nov 3, 2023
adafa32
test(wave): Add freeze and update build repo
edmundmiller Nov 3, 2023
59f6b4f
refactor(wave): What happens if I add a container?
edmundmiller Nov 3, 2023
d7cbe39
refactor(wave): Have both bowtie modules use the same env
edmundmiller Nov 3, 2023
7edc6d3
test: Cut out using wave on tests
edmundmiller Nov 3, 2023
b737da1
refactor: What happens if we use the singularity one?
edmundmiller Nov 3, 2023
5e838e7
refactor: Keep container directives for offline download
edmundmiller Nov 10, 2023
e89a5b5
feat: Try new singularity OCI setting
edmundmiller Nov 22, 2023
7312a7a
build: Update container name
edmundmiller Nov 22, 2023
6ea8d38
chore: Bump wave-cli version
edmundmiller Nov 26, 2023
0b50913
ci: Install runc
edmundmiller Nov 26, 2023
a4a11c5
ci: Switch to singularityhub action
edmundmiller Nov 26, 2023
39bbce3
ci: Install new singularity manually
edmundmiller Nov 26, 2023
41602b0
ci: Install dependancies for singularity
edmundmiller Nov 26, 2023
bc00761
ci: runc => crun
edmundmiller Nov 26, 2023
df744e2
ci: Fix cgroup error
edmundmiller Nov 26, 2023
da53a8d
ci: That'll do it
edmundmiller Nov 28, 2023
94aef22
ci: Remove Dockerfile
edmundmiller Nov 30, 2023
6d3e32e
ci: Update name
edmundmiller Nov 30, 2023
1759f64
ci: Push to the correct repos
edmundmiller Nov 30, 2023
1c65a71
ci: Remove OCI stuff
edmundmiller Nov 30, 2023
2f06ec6
ci: Need a full URL
edmundmiller Nov 30, 2023
255b05c
ci: Fix // in container name
edmundmiller Nov 30, 2023
f2e8c7a
ci: Remove push
edmundmiller Nov 30, 2023
509c300
build: Add containers back
edmundmiller Nov 30, 2023
463af3b
ci: Add cache repos
edmundmiller Nov 30, 2023
6dfdcfc
ci: Change registry name to use _
edmundmiller Nov 30, 2023
e0d58c3
build: / => _ in container name
edmundmiller Nov 30, 2023
8505eec
Try ociAutoPull
edmundmiller Feb 16, 2024
6961e19
chore: Add renovate comments to samtools
edmundmiller Feb 16, 2024
e93ad79
test: Add ociAutoPull to nf-test
edmundmiller Feb 16, 2024
7b1070c
ci: Use latest Nextflow
edmundmiller Feb 16, 2024
881de0a
ci: Bump wave version
edmundmiller Feb 16, 2024
25f2b00
chore: Bump containers with new wave version
edmundmiller Feb 16, 2024
7a6eb3f
ci: Remove Singularity building
edmundmiller Feb 16, 2024
f61a1ae
ci: Clean up conda building
edmundmiller Feb 16, 2024
65b9816
ci: Add Docker wave step
edmundmiller Feb 16, 2024
bb5368a
ci: Add Spack build Step
edmundmiller Feb 16, 2024
802588c
chore: Update container registry
edmundmiller Feb 16, 2024
c2fe72e
build(bowtie): Try bowtie with spack
edmundmiller Feb 16, 2024
5f0e2da
chore: Bump action versions
edmundmiller Feb 16, 2024
1e738d1
ci: Follow the example and add "files"
edmundmiller Feb 16, 2024
8d2faf8
ci: Try removing quotepath
edmundmiller Feb 17, 2024
d3a1fa6
ci: That'll do it
edmundmiller Feb 17, 2024
f5579cd
fix: Spack syntax
edmundmiller Feb 17, 2024
fc4a9e8
ci: Remove spack for now
edmundmiller Feb 26, 2024
116adce
build: Test a theory for gatk4 packaging bug
edmundmiller Feb 26, 2024
6243136
build: Try passing a url
edmundmiller Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,17 @@ jobs:
with:
distribution: "temurin"
java-version: "17"
- name: Setup Nextflow ${{ matrix.NXF_VER }}
- name: Setup Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"
version: latest-everything

- name: Setup apptainer
- name: Install Singularity
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main
run: |
wget https://github.com/sylabs/singularity/releases/download/v4.0.2/singularity-ce_4.0.2-jammy_amd64.deb
sudo apt-get install -y libfuse2
sudo dpkg -i singularity-ce_4.0.2-jammy_amd64.deb

- name: Set up Singularity
if: matrix.profile == 'singularity'
Expand Down Expand Up @@ -580,6 +583,8 @@ jobs:
java-version: "17"
- name: Setup Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: latest-everything

- name: Cache nf-test installation
id: cache-software
Expand All @@ -596,9 +601,12 @@ jobs:
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/

- name: Setup apptainer
- name: Install Singularity
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main
run: |
wget https://github.com/sylabs/singularity/releases/download/v4.0.2/singularity-ce_4.0.2-jammy_amd64.deb
sudo apt-get install -y libfuse2
sudo dpkg -i singularity-ce_4.0.2-jammy_amd64.deb

- name: Set up Singularity
if: matrix.profile == 'singularity'
Expand Down
167 changes: 167 additions & 0 deletions .github/workflows/wave.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: Wave
# When environment.yml is changed
on:
pull_request:
paths:
- "**/environment.yml"
- "**/Dockerfile"
- "**/spack.yml"

env:
WAVE_VER: "1.2.0"

jobs:
gen-matrix:
name: generate-matrix
runs-on: ubuntu-latest
outputs:
conda-matrix: ${{ steps.conda-diff.outputs.all_changed_files }}
docker-matrix: ${{ steps.docker-diff.outputs.all_changed_files }}
spack-matrix: ${{ steps.spack-diff.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4

- name: Find conda differences
id: conda-diff
uses: tj-actions/changed-files@v42
with:
json: true
escape_json: false
files: |
modules/**/environment.yml

- name: Find Dockerfile differences
id: docker-diff
uses: tj-actions/changed-files@v42
with:
json: true
escape_json: false
files: |
modules/**/Dockerfile

- name: Find Spack differences
id: spack-diff
uses: tj-actions/changed-files@v42
with:
json: true
escape_json: false
files: |
modules/**/spack.yml

conda-build:
if: "${{ fromJson(needs.gen-matrix.outputs.conda-matrix) }}"
needs: gen-matrix
name: Conda
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 4
matrix:
files: "${{ fromJson(needs.gen-matrix.outputs.conda-matrix) }}"
steps:
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@v4

- name: Install wave-cli
run: |
wget -q https://github.com/seqeralabs/wave-cli/releases/download/v${WAVE_VER}/wave-${WAVE_VER}-linux-x86_64
sudo mv wave-${WAVE_VER}-linux-x86_64 /usr/local/bin/wave
chmod +x /usr/local/bin/wave

- name: Create a registry name
uses: actions/github-script@v7
id: registry-name
with:
result-encoding: string
script: |
return '${{ matrix.files }}'.replace('modules/nf-core/', '').replace('/environment.yml', '').replace('/', '_');

- name: Build container
run: |
wave --conda-file "${{ matrix.files }}" \
--freeze \
--await \
--build-repo quay.io/nf-core/modules/${{steps.registry-name.outputs.result}} \
--cache-repository quay.io/nf-core/wave-cache \
--tower-token ${{ secrets.TOWER_ACCESS_TOKEN }} \
--tower-workspace-id ${{ secrets.TOWER_WORKSPACE_ID }}

docker-build:
if: "${{ fromJson(needs.gen-matrix.outputs.docker-matrix) }}"
needs: gen-matrix
name: Docker
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 4
matrix:
files: "${{ fromJson(needs.gen-matrix.outputs.docker-matrix) }}"
steps:
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@v4

- name: Install wave-cli
run: |
wget -q https://github.com/seqeralabs/wave-cli/releases/download/v${WAVE_VER}/wave-${WAVE_VER}-linux-x86_64
sudo mv wave-${WAVE_VER}-linux-x86_64 /usr/local/bin/wave
chmod +x /usr/local/bin/wave

- name: Create a registry name
uses: actions/github-script@v7
id: registry-name
with:
result-encoding: string
script: |
return '${{ matrix.files }}'.replace('modules/nf-core/', '').replace('/Dockerfile', '').replace('/', '_');

- name: Build container
run: |
wave -f "${{ matrix.files }}" \
--freeze \
--await \
--build-repo quay.io/nf-core/modules/${{steps.registry-name.outputs.result}} \
--cache-repository quay.io/nf-core/wave-cache \
--tower-token ${{ secrets.TOWER_ACCESS_TOKEN }} \
--tower-workspace-id ${{ secrets.TOWER_WORKSPACE_ID }}

# FIXME https://github.com/seqeralabs/wave/issues/351
# spack-build:
# if: "${{ fromJson(needs.gen-matrix.outputs.spack-matrix) }}"
# needs: gen-matrix
# name: Spack
# runs-on: ubuntu-latest
# timeout-minutes: 60
# strategy:
# fail-fast: false
# max-parallel: 4
# matrix:
# files: "${{ fromJson(needs.gen-matrix.outputs.spack-matrix) }}"
# steps:
# # Use the @nf-core-bot token to check out so we can push later
# - uses: actions/checkout@v4

# - name: Install wave-cli
# run: |
# wget -q https://github.com/seqeralabs/wave-cli/releases/download/v${WAVE_VER}/wave-${WAVE_VER}-linux-x86_64
# sudo mv wave-${WAVE_VER}-linux-x86_64 /usr/local/bin/wave
# chmod +x /usr/local/bin/wave

# - name: Create a registry name
# uses: actions/github-script@v7
# id: registry-name
# with:
# result-encoding: string
# script: |
# return '${{ matrix.files }}'.replace('modules/nf-core/', '').replace('/spack.yml', '').replace('/', '_');

# - name: Build container
# run: |
# wave --spack-file "${{ matrix.files }}" \
# --freeze \
# --await \
# --build-repo quay.io/nf-core/modules/${{steps.registry-name.outputs.result}} \
# --cache-repository quay.io/nf-core/wave-cache \
# --tower-token ${{ secrets.TOWER_ACCESS_TOKEN }} \
# --tower-workspace-id ${{ secrets.TOWER_WORKSPACE_ID }}
2 changes: 1 addition & 1 deletion modules/nf-core/bclconvert/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# Dockerfile to create container with bcl-convert
# Push to nfcore/bclconvert:<VER>
# Push to quay.io/nf-core/modules/bclconvert:<VER>

FROM debian:bullseye-slim
ARG BCLCONVERT_VERSION="4.2.7"
Expand Down
1 change: 1 addition & 0 deletions modules/nf-core/bowtie/align/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ channels:
- defaults
dependencies:
- bioconda::bowtie=1.3.0
- bioconda::samtools=1.16.1
4 changes: 1 addition & 3 deletions modules/nf-core/bowtie/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ process BOWTIE_ALIGN {
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:c84c7c55c45af231883d9ff4fe706ac44c479c36-0' :
'biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:c84c7c55c45af231883d9ff4fe706ac44c479c36-0' }"
container "nf-core/modules/bowtie_align:bowtie_align--d797c0ccd2d330fd"

input:
tuple val(meta), path(reads)
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bowtie/align/spack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spack:
specs:
- [email protected]
- [email protected]

concretizer:
unify: true
1 change: 1 addition & 0 deletions modules/nf-core/bowtie/build/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ channels:
- defaults
dependencies:
- bioconda::bowtie=1.3.0
- bioconda::samtools=1.16.1
4 changes: 1 addition & 3 deletions modules/nf-core/bowtie/build/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ process BOWTIE_BUILD {
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bowtie:1.3.0--py38hed8969a_1' :
'biocontainers/bowtie:1.3.0--py38hed8969a_1' }"
container "nf-core/modules/bowtie_build:bowtie_build--4ee5ca3f4bf65e6a"

input:
path fasta
Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/gatk4/germlinecnvcaller/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::gatk4=4.5.0.0
- pip:
- https://swift.rc.nectar.org.au/v1/AUTH_377/public/gatkPythonPackageArchive.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions modules/nf-core/samtools/view/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ channels:
- bioconda
- defaults
dependencies:
# renovate: datasource=conda depName=bioconda/samtools
- bioconda::samtools=1.19.2
# renovate: datasource=conda depName=bioconda/htslib
- bioconda::htslib=1.19.1
4 changes: 1 addition & 3 deletions modules/nf-core/samtools/view/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ process SAMTOOLS_VIEW {
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' :
'biocontainers/samtools:1.19.2--h50ea8bc_0' }"
container "nf-core/modules/samtools_view:samtools_view--033f764f39eb1f2d"

input:
tuple val(meta), path(input), path(index)
Expand Down
3 changes: 2 additions & 1 deletion tests/config/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ process {
if ("$PROFILE" == "singularity") {
singularity.enabled = true
singularity.autoMounts = true
singularity.ociAutoPull = true
} else if ("$PROFILE" == "conda") {
conda.enabled = true
} else if ("$PROFILE" == "mamba") {
Expand Down Expand Up @@ -41,5 +42,5 @@ conda { createTimeout = "120 min" }
includeConfig 'test_data.config'

manifest {
nextflowVersion = '!>=23.04.0'
nextflowVersion = '!>=23.12.0-edge'
}
3 changes: 2 additions & 1 deletion tests/config/nf-test.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ profiles {
singularity {
singularity.enabled = true
singularity.autoMounts = true
singularity.ociAutoPull = true
}
conda {
conda.enabled = true
Expand Down Expand Up @@ -46,5 +47,5 @@ conda { createTimeout = "120 min" }
includeConfig 'test_data.config'

manifest {
nextflowVersion = '!>=23.04.0'
nextflowVersion = '!>=23.12.0-edge'
}
Loading