Comments (5)
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
from singularity.
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
from singularity.
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:
`
[gmk@centos7-x64 demo]$ cat example.sspec
Name: pydmesg
Exec: ./pydmesg.py
%files
/usr/lib64/python2.7/encodings/string_escape.py
/usr/bin/dmesg
[gmk@centos7-x64 demo]$ singularity --quiet build example.sspec
Running test...
Hello from within the container... (no test code defined)
WROTE: pydmesg.sapp
[gmk@centos7-x64 demo]$ ./pydmesg.sapp | tail -n 5
[2016-04-25 08:34:48] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[2016-04-25 09:02:48] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[2016-04-25 09:03:46] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[2016-04-25 09:06:43] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[2016-04-25 09:07:25] SELinux: initialized (dev proc, type proc), uses genfs_contexts
`
from singularity.
Thanks Greg !
I will try that asap !
Best
Remy
from singularity.
Ok, it works.
Thanks !
from singularity.
Related Issues (20)
- Ability in ECL to disable run-time options based on security profile HOT 1
- root filesystem extraction failed: extract command failed: ERROR : Failed to create user namespace HOT 1
- Singularity env value containing a $$ get's converted to random number HOT 1
- In dir.create(gsub(basename(args$out), "", args$out), recursive = TRUE) : cannot create dir HOT 1
- After the administrator adds the fakeroot mapping, I can't build an image as fakeroot. HOT 1
- After the administrator adds the fakeroot mapping, I still can't build an image as fakeroot HOT 1
- Options for podman alternative to docker-daemon boostrap-agent HOT 1
- Could not change permissions for temporary file when apt update. HOT 1
- problem in binding a directory from the host machine to the singularity container HOT 1
- Specifying --env-file returns a UID / GID readonly warning HOT 1
- container creation failed: mount hook function failure: mount /proc/self/fd/3->/var/lib/apptainer/mnt/session/rootfs error: while mounting image /proc/self/fd/3: squashfuse_ll exited with status 255: Something went wrong trying to read the squashfs image HOT 1
- FATAL: container creation failed: mount ERROR: while mounting image: no loop devices available HOT 1
- Failed to create mount namespace: mount namespace requires privileges, check Singularity installation : exit status 1 HOT 1
- OpenCL unavailable in Singularity with custom CUDA installation path and additional opencl related libraries from linux repository HOT 1
- Error in running def file during rpm installation HOT 1
- Singularity pull error: FATAL: While getting image info: error decoding image: invalid ObjectId in JSON HOT 1
- Singularity fails to build image on disk with sufficient space HOT 1
- Failed to invoke the specified Python 3 path HOT 1
- How do you authenticate to the Github container registry HOT 1
- manifest unknown HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from singularity.