Skip to content
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

error: DLKcat Docker invalid reference format error #351

Closed
edkerk opened this issue Aug 23, 2023 Discussed in #350 · 10 comments · Fixed by #352
Closed

error: DLKcat Docker invalid reference format error #351

edkerk opened this issue Aug 23, 2023 Discussed in #350 · 10 comments · Fixed by #352
Labels
fixed in develop Has already been addressed in develop branch

Comments

@edkerk
Copy link
Member

edkerk commented Aug 23, 2023

Discussed in #350

Originally posted by wshao1 August 23, 2023
I am trying to create a full ecModel based on Human-GEM 1.16.0, using a modified form of tutorials/full_ecModel/protocol.m. Step 7 (DLKcat prediction through machine learning) breaks at the runDLKcat() command, giving the following traceback:
image

I've inspected runDLKcat(), specifically the docker run command at line 38, but it's not clear to me why the reference format is incorrect. Perhaps the filepath is specific to whoever created the tutorial, and we need to change it for our own machine?

@edkerk
Copy link
Member Author

edkerk commented Aug 23, 2023

@wshao1, could you please provide:

  • Your OS + version.
  • If Windows, do you have WSL installed?
  • Your MATLAB version.
  • Your Docker version.

The problem is probably not a filepath that is user-specific. If you've reached Step 7 of the tutorial, then params.path in the model adapter is correct, and that's where the filepath is built from.

Can you also please:

  1. Run dbstop in runDLKcat at 38 in the MATLAB command window.
  2. Run the runDLKcat() command as you've done previously.
  3. Once MATLAB pauses, run ['docker run --rm -v ' fullfile(params.path,'/data') ':/data ghcr.io/sysbiochalmers/dlkcat-gecko:0.1 /bin/bash -c "python DLKcat.py /data/DLKcat.tsv /data/DLKcatOutput.tsv"'] to see what is the command that should be run at that point.

To again remove the dbstop you can run dbclear all in runDLKcat.

@mihai-sysbio
Copy link
Member

Thanks for reporting this @wshao1!

I've inspected runDLKcat(), specifically the docker run command at line 38, but it's not clear to me why the reference format is incorrect.

In addition to what @edkerk mentioned above, could I ask you to copy-paste the output of the docker run command here please?

@edkerk
Copy link
Member Author

edkerk commented Aug 23, 2023

@mihai-sysbio, when running a terminal command in MATLAB via system, the standard output is shown in the MATLAB command window. So the output from docker run is docker: invalid reference format..

@wshao1
Copy link

wshao1 commented Aug 23, 2023

@edkerk I've tried your 3 steps, but I still see the same error. I assume in step 3 you meant to run system(['docker run --rm -v ' fullfile(params.path,'/data') ':/data ghcr.io/sysbiochalmers/dlkcat-gecko:0.1 /bin/bash -c "python DLKcat.py /data/DLKcat.tsv /data/DLKcatOutput.tsv"']). Without system(), the string is just echoed back.

My system info:

  • Windows 11
  • Yes, I have WSL installed.
  • MATLAB R2021a
  • Docker v4.22.0

@edkerk
Copy link
Member Author

edkerk commented Aug 24, 2023

No, I did not mean to include system(), I wanted to see the exact string that would be parsed to system(), where for instance fullfile(params.path,'/data') is replaced.

@wshao1
Copy link

wshao1 commented Aug 24, 2023

Ah ok, here is the exact string: 'docker run --rm -v C:\Users\wshao2\OneDrive - University of Virginia\papin_lab\projects\sasco_project_2\deliverables\metabolic_models\analysis\ecHCT116\data:/data ghcr.io/sysbiochalmers/dlkcat-gecko:0.1 /bin/bash -c "python DLKcat.py /data/DLKcat.tsv /data/DLKcatOutput.tsv"'.

@edkerk
Copy link
Member Author

edkerk commented Aug 24, 2023

Perhaps the space in the path (OneDrive - University of Virginia) is problematic. Can you move the folder to a different location (and change it in the model adapter's param.path)?

@mihai-sysbio
Copy link
Member

mihai-sysbio commented Aug 24, 2023

@mihai-sysbio, when running a terminal command in MATLAB via system, the standard output is shown in the MATLAB command window. So the output from docker run is docker: invalid reference format..

@wshao1 what I had in mind was to run the Docker command as you copied above directly in the (system) terminal (not from Matlab), in which case Docker would give more info about the error.

Now though, having seen the file path, I am quite sure those spaces are problematic. To verify, could you modify line 38 to include quotation marks " around fullfile():

system(['docker run --rm -v "' fullfile(params.path,'/data') '":/data ghcr.io/sysbiochalmers/dlkcat-gecko:0.1 /bin/bash -c "python DLKcat.py /data/DLKcat.tsv /data/DLKcatOutput.tsv"'])

@edkerk
Copy link
Member Author

edkerk commented Aug 24, 2023

I was able to replicate this on Windows, now solved in #352.

@edkerk edkerk linked a pull request Aug 24, 2023 that will close this issue
2 tasks
@edkerk edkerk added the fixed in develop Has already been addressed in develop branch label Aug 24, 2023
@edkerk edkerk changed the title error: DLKcat Docker reference format error error: DLKcat Docker invalid reference format error Aug 24, 2023
@wshao1
Copy link

wshao1 commented Aug 24, 2023

The quotation marks solved it, thank you so much!

@edkerk edkerk mentioned this issue Nov 30, 2023
2 tasks
@edkerk edkerk closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in develop Has already been addressed in develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants