Command line tool for Wave containers provisioning service.
Wave allows augmenting existing containers and building containers on demand so that it can be used in your Docker (replace-with-your-own-fav-container-engine) workflow.
- Build container images on-demand for a given container file (aka Dockerfile);
- Build container images on-demand based on one or more Conda packages;
- Build container images on-demand based on one or more Spack packages;
- Build container images for a specified target platform (currently linux/amd64 and linux/arm64);
- Push and cache built containers to a user-provided container repository;
- Build Singularity native containers both using a Singularity spec file, Conda package(s) and Spack package(s);
- Push Singularity native container images to OCI-compliant registries;
Download the Wave pre-compiled binary for your operating system from the GitHub releases page and give execute permission to it.
If you use Homebrew, you can install like this:
brew install seqeralabs/tap/wave-cli
-
Create a basic Dockerfile file (or use an existing one)
cat << EOF > ./Dockerfile FROM alpine RUN apk update && apk add bash cowsay \ --update-cache \ --repository https://alpine.global.ssl.fastly.net/alpine/edge/community \ --repository https://alpine.global.ssl.fastly.net/alpine/edge/main \ --repository https://dl-3.alpinelinux.org/alpine/edge/testing EOF
-
Run it provisioning the container on-the-fly
docker run --rm $(wave -f ./Dockerfile) cowsay "Hello world"
-
Create a directory holding the files to be added to your container:
mkdir -p new-layer/usr/local/bin printf 'echo Hello world!' > new-layer/usr/local/bin/hello.sh chmod +x new-layer/usr/local/bin/hello.sh
-
Run the container via Wave
container=$(wave -i alpine --layer new-layer) docker run $container sh -c hello.sh
-
Create a Dockerfile for your container image:
cat << EOF > ./Dockerfile FROM alpine ADD hello.sh /usr/local/bin/ EOF
-
Create the build context directory:
mkdir -p build-context/ printf 'echo Hello world!' > build-context/hello.sh chmod +x build-context/hello.sh
-
Build and run the container on the fly:
container=$(wave -f Dockerfile --context build-context) docker run $container sh -c hello.sh
container=$(wave --conda-package bamtools=2.5.2 --conda-package samtools=1.17)
docker run $container sh -c 'bamtools --version && samtools --version'
-
Create the Conda environment file:
cat << EOF > ./conda.yaml name: my-conda channels: - bioconda - conda-forge dependencies: - bamtools=2.5.2 - samtools=1.17 EOF
-
Build and run the container using the Conda environment:
container=$(wave --conda-file ./conda.yaml) docker run $container sh -c 'bamtools --version'
container=$(wave --conda-package https://prefix.dev/envs/pditommaso/wave/6x60arx3od13/conda-lock.yml)
docker run $container cowpy 'Hello, world!'
container=$(wave --conda-package fastp --platform linux/arm64)
docker run --platform linux/arm64 $container sh -c 'fastp --version'
container=$(wave --spack-package cowsay)
docker run $container sh -c 'cowsay Hello world!'
container=$(wave --singularity --conda-package bamtools=2.5.2 --build-repo docker.io/user/repo --freeze --await)
singularity exec $container bamtools --version
-
Install GraalVM-Java 21.0.1
sdk install java 21.0.1-graal
or if it's already installed
sdk use java 21.0.1-graal
-
Compile & run tests
./gradlew check
-
Native compile
./gradlew app:nativeCompile
-
Run the native binary
./app/build/native/nativeCompile/wave --version