ProteoWizard / container

Options for running ProteoWizard applications via containers (e.g. Docker)
Apache License 2.0
9 stars 8 forks source link

docker msconvert couldn't find the file #9

Closed Danissss closed 4 years ago

Danissss commented 4 years ago

Hi, I was trying to use the msconvert to convert *.wiff file like following:

sudo docker run -it --rm chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert test.wiff --mzXML

or

sudo docker run -it --rm -e WINEDEBUG=-all -v /home/danis:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert test.wiff

both got

[msconvert] no files found matching "test.wiff"
[msconvert] No files specified.

I am running ubuntu 18 64 bit; the container version is latest.

Thank you for your help!

SamiralVdB commented 1 year ago

I am facing the exact same problem. Could you please share the solution to this issue?

malcook commented 1 year ago

I too was facing this issue and found that it was a underlying permissions issue which was resolved by making the *.wiff files world readable. Also, the output directory needed to be made world writeable.

FWIW: I tried to craft a better solution by passing --user $(id -u):$(id -g) to docker, but that resulted in a different problem:

wine: '/wineprefix64' is not owned by you

@SamiralVdB and @Danissss - if you have a better approach it would be much welcome

chambm commented 1 year ago

There is a wine64_anyuser script (in lieu of "wine" or "wine64") you can try with the -u option. If that doesn't work, try the mywine script.

malcook commented 1 year ago

Thanks @chambm for the attention and suggestions!

Trying wine64_anyuser with -u option gives me: sudo: you do not exist in the passwd database

trying mywine (also with -u) results in:

 mkdir: cannot create directory '/mywineprefix': Permission denied
cp: target '/mywineprefix/' is not a directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/c:': No such file or directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/z:': No such file or directory
wine: chdir to /mywineprefix : No such file or directory

am I taking your suggestions correctly? is there something else to try?

chambm commented 1 year ago

Ugh, I forgot that the anyuser script requires the user id to exist inside the container. It's not currently setup to work for truly any user (I'm not sure how to). I don't know what's going on with the mywine script. Maybe --user $(id -u):docker instead?

malcook commented 1 year ago

I would not expect --user $(id -u):docker to work since there is no docker group on the host system, and indeed, when I try, I get

docker: Error response from daemon: unable to find group docker: no matching entries in group file.

I also checked and there is no docker group in the image either.

Thanks for the suggestions.

Are you familiar with Creating a singularity container from the pwiz docker container?

It purports to provide a means of creating a singularity container which should not suffer from these permissions challenges by. It does this by converting to singularity a docker image which is a predecessor to your chambm/pwiz-skyline. Perhaps the approach can be adopted to work with your up-to-date image. Any thoughts there?

chambm commented 1 year ago

I suspect that creating the $USER account as part of the ENTRYPOINT (if it doesn't exist) would be a reasonable way to make the *_anyuser scripts work as intended, but I don't have time to fix that now.

chambm commented 1 year ago

The singularity approach you linked to uses the mywine script with the /mywineprefix directory as the scratch directory. I don't know if docker has that -S option but you could definitely use -v to mount /mywineprefix from the host (make it world-writable) and that would probably fix the mywine script. I prefer the anyuser scripts because they don't require copying the entire Wine prefix to another directory, but whatever works.