-
Notifications
You must be signed in to change notification settings - Fork 4
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
284 add support for arm architecture for singularity build #286
284 add support for arm architecture for singularity build #286
Conversation
…-arm-architecture-for-singularity-build
…-arm-architecture-for-singularity-build
…-arm-architecture-for-singularity-build
Singularity 4 docker is out, I will move forward with this PR |
we have platform in two places while building singularity image @pditommaso should i create another field in buildrequest to specify singularity platform? |
Ideally this should be enough |
@pditommaso so we should use singularity image when the platform is arm46 |
src/main/groovy/io/seqera/wave/service/builder/BuildStrategy.groovy
Outdated
Show resolved
Hide resolved
I think multi-arch builds are not supported yet in Singularity 4.0. The user guide only mentions support for pulling architecture-/platform- specific containers: The user case for this feature seems to be to provide emulation support to run containers on a certain arch, that were built for a different arch. (I can think e.g. of those x86_64 only containers, that someone may need to run on ARM, RISC or other). So for now the only available way for multi-arch seems to be docker builds. |
Evoking the one and mighty Vanessasaurus @vsoch : are multi arch builds with Singularity currently under consideration? (I browsed issues / discussions in the sylabs singularity repo, but could not find mention of it) |
[update] after some additional study on the command line (still undocumented), I see that However, the machine on which singularity is running needs to have matching architecture. So I have two questions @munishchouhan :
Thanks, |
src/main/groovy/io/seqera/wave/service/builder/DockerBuildStrategy.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/io/seqera/wave/service/builder/KubeBuildStrategy.groovy
Outdated
Show resolved
Hide resolved
…ture-for-singularity-build' into 284-add-support-for-arm-architecture-for-singularity-build
This feature needs two changes, one is singularity arm image, and arm node
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more request:
please add appropriate testing for the K8s case in src/test/groovy/io/seqera/wave/service/builder/KubeBuildStrategyTest.groovy
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go for me
src/main/groovy/io/seqera/wave/service/builder/KubeBuildStrategy.groovy
Outdated
Show resolved
Hide resolved
@Value('${wave.build.singularity-image-arm}') | ||
String singularityImageArm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Value('${wave.build.singularity-image-arm}') | |
String singularityImageArm | |
@Value('${wave.build.singularity-image-arm64}') | |
String singularityImageArm64 |
Let's rename to arm64 suffix for consistency.
Also, this can be made nullable, and the default to singularityImage + '-arm64'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe i'm wrong here, but it looks like that when singularityImageArm64
is not specified null
it will be used.
My suggestion was instead that when singularityImageArm64
is not specied (nullable) the value of singularityImage
is appending to it the -arm64
, suffix.
To avoid duplicating the code, it could make sense to introduce an object BuildConfig
(along the same way of SpackConfig) that holds all the wave.build.*
settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in this way, we are coupling our code with the naming convention of singularity docker image. If somewhere down the line they change this, then our code will be broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but still remain the ability to override it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i understood now, thanks for the clarification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@munishchouhan @pditommaso how are we going here? |
@marcodelapierre everything is done from my side |
@pditommaso when you get a chance please have a look at Munish' commits that tackle your request |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
For sake of simplicity I've removed the @nullable on arm64 image name. Let's implement it in the BuildConfig object |
add arm architecture support for singularity builds using --platform flag