kharchenkolab / Baysor

Bayesian Segmentation of Spatial Transcriptomics Data
MIT License
142 stars 29 forks source link

Container installation / singularity image #89

Open sebgoti opened 11 months ago

sebgoti commented 11 months ago

Given the large memory requirements that Baysor needs to process samples with millions of spots, I wonder if it would be possible to improve the stability of the docker container (which could be used in principle to build a singularity container for the HPC). What I mean by this? For example, the docker container can be ran in interactive mode with:

image

However, it does not work when trying to run a command directly on the image without going into the interactive mode:

image

This prevents Baysor to being used by other workflow programming languages such as Nextflow or Snakamake, which I think presents a huge disadvantage in terms of reproducibility and integration for scientific workflow management.

I also have the feeling that maybe this could help to create a stable Singularity image that could be used on the HPC.

maximilian-heeg commented 10 months ago

Hi,

I did have issues running the container image on our HPC as well. That's why I wrapped the Baysor binary in small new images for docker and singularity/apptainer. Using this, I am able to run Baysor on our HPC using singularity (and can hopefully integrate it into nextflow pipelines soon)

I have created a GitHub repository that contains the build scripts. The singularity sif file is uploaded as a release on GitHub. The docker container is pushed to hub.docker.com.

# Use the images from docker.io with e.g.
docker run maximilianheeg/baysor:v0.6.2 run --help  
# --no-home might be required to prevent: Bind mount '/home/USER => /home/USER' overlaps container CWD 
singularity run --no-home docker://maximilianheeg/baysor:v0.6.2 preview --help

# Or a locally downloaded sif file
singularity run baysor.sif run --help

Hopefully, this can help you to get Baysor running on your HPC too.

Max