ProteoWizard / pwiz

The ProteoWizard Library is a set of software libraries and tools for rapid development of mass spectrometry and proteomic data analysis software.
http://proteowizard.sourceforge.net/
Apache License 2.0
215 stars 98 forks source link

Docker to Singularity for HPC and permissions #2387

Open tracychew opened 1 year ago

tracychew commented 1 year ago

Hi, I am using a Linux HPC system to use msconvert to convert .WIFF files to .mzML. We can only use Singularity on HPC, and do not have root access. I am using the docker container provided by pwiz and converted it to singularity, however I get the issue described here: https://stackoverflow.com/questions/73328706/running-singularity-container-without-root-as-different-user-inside

Is there an alternate workaround that does not involve rebuilding the container for every user? We would like to include this as part of a nextflow workflow, and this issue really limits its ease of portability. Thanks!

jspaezp commented 1 year ago

Ive struggled with this in the past... what I found works for me is ... documented here: https://github.com/jspaezp/elfragmentador-data#setting-up-msconvert-on-singularity-

it is a lot less automatic that what I would like it to be but it works ... and as long as all the users that would use the nextflow workflow have write access to the directory (i know ... not ideal) it should work.

sneumann commented 1 year ago

Hi, I am using it in a script through

for FILE in "${FILES[@]}" ; do
  TMPMYWINEPREFIX=`mktemp -d /dev/shm/wineXXX`
  singularity exec \
    --cleanenv \
    -B "$OUTDIR":/data \
    -B $TMPMYWINEPREFIX:/mywineprefix \
    --writable-tmpfs \
    "$IMAGE" \
    mywine msconvert \
    --32 --zlib --filter "peakPicking true 1-" --filter "zeroSamples removeExtra" \
    --outdir  z:/data/mzML \
    "z:/data/$FILE"
   sleep 2 ; rmdir $TMPMYWINEPREFIX
done

So the temporary directory for the wine stuff is created as a user, and then mounting that directory into the container. I haven't tested recently, but this could get you on track. Yours, Steffen

jonasscheid commented 1 year ago

Hi @tracychew! I have the exact same issue here. We also want to integrate this docker container in our nextflow pipeline and run it via singularity on an HPC. Any progress on this?

I would be super grateful for a smooth solution

jspaezp commented 1 year ago

@jonasscheid I hate being that guy ... BUT, it has been reported a while ago (2019) and it is not something that can be easily fixed. And at the end of the day it is trying to allow something we should not be able to do anyway (due to proprietary company support).

https://github.com/ProteoWizard/pwiz/issues/2387#issuecomment-1320984700 try this solution. It has worked for several people over here: https://github.com/ProteoWizard/container/issues/1 and might work for you as well...

I guess what I am trying to say is that ... I think the current state of the container is as good as we are going to get until the vendors release libraries that run in linux. Please let me know if the solution I posted does not work for you and I would be happy to (try to) help!