hey <!subteam^S016E36N7TQ> :relaxed: what does thi...
# drugresponseeval
j
hey <!subteam^S016E36N7TQ> ☺️ what does this github action do that is failing here? https://github.com/nf-core/drugresponseeval/actions/runs/19575638560/job/56060050856?pr=64
m
it runs
nf-core download
and
nextflow run
and checks if download pulled the same containers. this is to make sure that the pipeline can be successfully run (container-wise) in an offline environment using
nf-core download
. My guess is that the download command has problems with https://github.com/nf-core/drugresponseeval/blob/dev/nextflow.config#L10
m
Would you suggest to transfer it to quay.io?
p
Yup, nf-core controlled ideally. It's in the guidelines / docs I think.
m
We have the #request-core channel for this
j
And this has to be done manually every time I do a new drevalpy version release?
Because right now, I have a GitHub action for uploading to ghcr.io upon version release
And the whole pipeline is based on the drevalpy package which is why I have the global process.container
Uh and then can I also upload an apptainer container to quay.io? Because I also still have this issue https://github.com/nf-core/drugresponseeval/issues/51 which I would eventually like to resolve
m
Any possibility to convert to a bioconda/conda recipe?
j
should be ok, my env.yml just looks like this πŸ˜„
but I remember that some time ago, I read(?) that this might be deprecated because you're switching to seqera containers etc
so I didn't do it
m
Oooh
If it's just that, then it's simple enough to build on Seqera containers
Both for Docker and singularity
j
yes, it's just not a very lightweight package because of pytorch … the docker container is 1.7GB; and then converting the docker container do apptainer took up a lot of space
so what is the best way/latest way to do it? ☺️
j
Bjt you might as well put it o. BioConda anyway, as seqera container s pulls from there already?
And then more accessible to more people
j
I could also provide a definition file to directly build the apptainer container, I alongside the Dockerfile I already have anyways
j
And as it's on pip you should get automatic uodates
j
I can also do that if you say that's what's best ☺️
p
Seqera Containers works with both (bio)conda and PyPI already, so that's not a blocker
It sometimes fails with these very large / slow package builds due to timeouts or lack of disk space. But it's easy enough to try and see if that'll be an issue or not
Conda is basically always preferred because then the binaries are pre-built, whereas PyPI is always built from source on the user's machine (or in this case, the Seqera Containers build machines)
Also for nf-core we have a strong preference / recommendation to publish packages on bioconda wherever possible. For packages on PyPI it's usually very quick - just a case of running
greyskull
as described in their docs
Then as @James Fellows Yates says - once you've done it once, it should always auto-update (I usually swap the PyPI URL from greyskull with the github one, but it should work with both anyway so doesn't make much difference)
This is a little work up front now (hopefully not much) but it's generally better for the wider bioinformatics community. And also makes it easier to tie into our nf-core automation. For example, we're working on automation using Renovate that watches for conda updates and then will bump the nf-core module automatically. So if you are published on conda, all you'd need to do is push a GitHub release which goes -> PyPI, -> Bioconda, -> #modules. Magic magic
Publishing custom docker images is only really ok as a last resort on nf-core, as it relies entirely on a single individual (you) to keep up to date, as no-one else has access. We usually only do that if there's some kind of licensing issue that prevents redistribution of the software
j
ok, then I'll try bioconda! What about the new release - is the github action that is failing right now a must or is it ok to include the biocontainer in a future release?
p
It would be much better to do the release with bioconda if possible - the CI test is mimicking real user behaviour, so it'll also fail for users trying to download the pipeline
The bioconda release should really only take a few minutes
j
p
For what it's worth, I've often had trouble fighting with
pip check
it gets put in there by default with greyskull but I'm not sure that it really adds much
I usually just delete that
neon cat spin 1
Bioconda PR merged - thanks for your patience @Judith Bernett!
j
thank you! sorry for all the confusion with the versions, I'll try to remove the caps asap
so then how does it work with the wave containers? I just wait a little and then drevalpy becomes available there?
p
No need to wait - as soon as it's available on conda (which should be seconds - minutes) then you can build with Wave / Seqera Containers
j
p
Make sure to tick the checkbox for "https" when building the singularity image
j
is it still platform-specific? 😞
p
Note that we are building the infrastructure to automate this process right now, over in #wg-container-conversion-task-force πŸ™‚ So hopefully won't need to do this for much longer! 🀞🏻
πŸ‘€ 1
You can choose the build platform, if that's what you mean?
m
πŸ‘€ 1
j
my custom Docker image was a multi-platform build (https://github.com/daisybio/drevalpy/blob/a5602b1caba2e8f7c55ee2f0437fcc7376a4d4e4/.github/workflows/publish-docker.yml#L64) so that it didn't matter which platform the user has
so what is the current state-of-the-art for supporting both platforms?
and the bioconda container would also be architecture-independent now, I think
p
For nf-core we will automate creation of all required container images, across all platforms. They will be independent images though, not multi-platform. See https://nf-co.re/blog/2024/seqera-containers-part-2
πŸ‘€ 1
So the automation will build 4x images: Docker, Singularity (native Singularity build), in both arm and arch64 architecutres.
We'll also use conda lock-files, for both arm and arch64 architectures.
m
That sounds SMART, AMAZING and so FANCY
apple party 1
j
Nice! But until then, should I use biocontainer / galaxy to support both platforms? Or should I build the 4 images and use the new --profile arm option to distinguish? Is there an example for that already?
p
Galaxy (Singularity) won't support both platforms I think πŸ€” Singularity doesn't do multi-arch images that I'm aware of.
I think that the bioconda + Singularity Containers images should be equivalent.
If it's a noarch package then it should be fine on both. Biocontainer images build on arch64
j
ahh i didn't know that
p
Yeah bioconda binaries can be noarch, but docker images always have to have some kind of underlying arch for the OS. So biocontainers are arch64.
πŸ’‘ 1
Multi-arch docker images work by masquerading as a single image when they are actually multiple, just nested within a manifest that instructs the docker runtime to fetch one image or the other.
p
Ah this is for #rnaseq? Yes in that case you can specify the arm images in that config file πŸ‘πŸ»
And the arch64 images in the module as normal
j
no, that's just my go to pipeline where I look haha
πŸ˜… 1
p
In this case, I'm afraid it's different to everything else
j
oh no hahaha
p
It was a guinea pig for our work on arm images - we created that config file manually for the pipeline to test out how arm support via profiles works in the wild.
That config file isn't in the template / in other pipelines
If you really want arm support now you can do the same process for all containers in your pipeline
or I guess just the one is also fine, as it'll fall back to the other containers gracefully
But I wouldn't bother unless you know for sure that the arch64 containers don't work on arm. For many / most packages the emulation is ok. Slower, but as long as it works it shouldn't be a major problem.
j
I see ☺️ I'm just always thinking about the arm support because I am developing on a Mac so this is also always the first architecture I "test" πŸ˜„
then I build the amd64 wave containers and see what happens
p
Hopefully pretty soon we will have full support via automation and you won't need to do anything, because it'll all be automated through #modules. So it'll just be a case of pulling updated modules into your pipeline and running the new tooling / CI.
This is #drugresponseeval right?
j
yes!
p
We can use that for testing the new stuff if you like
j
sure, happy to be the new guinea pig πŸ˜„
πŸ‘πŸ» 1
it will be an easy use case since we mostly just depend on this one container πŸ˜„
πŸŽ‰ 1
p
Just had a quick look at the pipeline code - you'll need to make several changes for the new infra: β€’ Every module should have an
environment.yml
alongside the
main.nf
, even if identical for every module β€’ Every process should contain
conda
and
container
declarations, even if identical β€’ No top-level container config in
nextflow.config
πŸ™ 1
This is needed for a lot of infrastructure stuff to work
You should also have
meta.yml
files for every module
I'm also a bit confused that the processes all call
.py
scripts, is it not a CLI tool? How does it work with the bioconda distribution?
j
Thanks! Will add this to your issue!
p
Yeah, CI is failing because of lack of support for
nf-core download
- I was thinking that would be the case with the way that you've defined the containers
πŸ‘€ 1
j
hm yes, I agree, it's not that pretty like that. The issue comes from the fact that drevalpy, the underlying python package, is also usable as standalone, so without the nextflow pipeline. We are right now just calling functions from the package to split up the individual steps executed. We have implemented only 2 CLI wrappers, one to run all experiments and one to run the visualization. We could make this prettier (and also less redundant) by implementing more CLI commands. Then, the python scripts would no longer be needed
I made a feature request issue in drevalpy so I don't forget πŸ˜„
πŸ‘πŸ» 1
p
If using something like Typer or Click it should be pretty easy - basically just adding decorators to existing functions (or maybe having a wrapper script that calls the functions).
πŸ‘€ 1
Calling filenames can be problematic, as different installation methods may not all put the scripts on the
PATH
It's safer to install as a Python CLI
πŸ‘ 1
j
@Phil Ewels I've implemented your required changes in https://github.com/nf-core/drugresponseeval/pull/69 πŸ™‚
πŸŽ‰ 1