-
Notifications
You must be signed in to change notification settings - Fork 426
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
2 issues while trying to build pydmesg #25
Comments
Hi, I can write a more detailed response when I get to my computer keyboard (phone isn't great for that) but quickly something that I noticed should help... Referencing a SAPP file by file name doesn't work for singularity commands (except run and install). For example: $ singularity check foo.sapp Will fail because the container name is not foo.sapp. Chances are it is just "foo" but that may not be guaranteed (eg someone renaming a sapp file). The output of "singularity list" will show you the installed container name. Use that name (or UUID) to address an installed container. Now the other issues are packaging issues from what I can tell. Singularity will try and resolve dependencies as best it can but in many cases it is a trial and error of playing with the %files section. I will look when I get to keyboard and see if I see anything else that might be helpful. Let me know if you get any further! Greg |
Hi Greg, With sapp UUID (the 'check' works; "Réussi" is french, it means succeeded) : remy@atlas:/tmp$ /opt/singularity/singularity-1.0/bin/singularity run 5681a8f5-31f9-49b5-986e-61f06dac48a0
/.singularity.exec: 2: exec: /media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg: not found
remy@atlas:/tmp$ /opt/singularity/singularity-1.0/bin/singularity strace 5681a8f5-31f9-49b5-986e-61f06dac48a0
...
close(4) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x7f7615382460, ~[RTMIN RT_1], SA_RESTORER, 0x7f7614dbcd40}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f7614dbcd40}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f7614dbcd40}, NULL, 8) = 0
read(10, "#!/bin/sh\nexec /media/remy/DATAP"..., 8192) = 77
execve("/media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg", ["/media/remy/DATAPART1/codes/9908"...], [/* 83 vars */]) = -1 ENOENT (No such file or directory)
write(2, "/.singularity.exec: 2: exec: ", 29/.singularity.exec: 2: exec: ) = 29
write(2, "/media/remy/DATAPART1/codes/9908"..., 67/media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg: not found) = 67
write(2, "\n", 1
) = 1
exit_group(127) = ?
+++ exited with 127 +++
/opt/singularity/singularity-1.0/bin/singularity check pydmesg
./.singularity.env: Réussi
./lib/x86_64-linux-gnu/libresolv.so.2: Réussi
./lib/x86_64-linux-gnu/librt.so.1: Réussi
./lib/x86_64-linux-gnu/libz.so.1: Réussi
./lib/x86_64-linux-gnu/libnss_files.so.2: Réussi
./lib/x86_64-linux-gnu/libnss_dns.so.2: Réussi
...
./usr/bin/strace: Réussi
./bin/sh: Réussi
./var/log/dmesg: Réussi
remy@atlas:/tmp$ grep -B1 /media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg pydmesg.sspec
%runscript
exec /media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg "$@"
--
%files
/media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg
--
/lib/x86_64-linux-gnu/libz.so.1
/media/remy/DATAPART1/codes/9908ac6b31133eb54331/pydmesg
edit : but as you can see, the container still does not work Best, Remy |
Heya Remy, Again, you don't need to reference the installed container via it's UUID, but that is an option. Notice container name when you do "singularity list", it does not include the ".sapp" suffix. If you include the suffix, it won't recognize the container name. I was able to get your example working but it took both running the latest master branch (as I just committed several fixes) and some additions to the specfile. Specifically there were two dependencies that could not be automatically probed: "string-escape" and the shell command "/usr/bin/dmesg". Once I added those, it worked just fine: ` %files |
Thanks Greg ! I will try that asap ! Best |
Ok, it works. |
Add version to extracted dir from tarball
Hi,
I tried to create a sapp of a python script ( https://gist.githubusercontent.com/dopuskh3/9908ac6b31133eb54331/raw/74beaa1f2c64e09b6152b1ac8849af172c12b6e1/pydmesg ), but I had some issues :
I tried also with relative path, same error.
After editing sspec file, it seems it missed /var/log/dmesg and /proc/uptime. I added it and reproduce the creation of the sapp, but obviously, I still get that error.
I also tried with another "pydmesg" piece of code but I had the same issue.
BTW, I wonder how singularity analyze python code (import stuff, open, or when we append a path to PYTHONPATH (e.g. : sys.path.append('/path/to/whatever')...), or if it just add the whole PYTHONPATH directory to sapp file.
Regards,
Remy
The text was updated successfully, but these errors were encountered: