Python Forum
python installation/running inside singularity container - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: python installation/running inside singularity container (/thread-38226.html)



python installation/running inside singularity container - erdemath - Sep-18-2022

I have singularity-ce version 3.10.2 on ubuntu 20.02. I am trying to install python package. It always says;

Error:
Singularity> apt-get -y update bash: apt-get: command not found
How can I resolve this?


RE: python installation/running inside singularity container - rob101 - Sep-20-2022

Not that I know the first thing about singularity-ce, but what I can see (or what I think I can see) is that you're trying to run a bash command (apt-get -y update) from the singularity-ce terminal, which is why (or so I assume) it's not going to work.

tbh, I don't think that this is not the correct Forum site for this topic, but as there's been no moderator intervention, maybe I'm wrong about that (also?).


RE: python installation/running inside singularity container - erdemath - Sep-21-2022

(Sep-20-2022, 09:44 PM)rob101 Wrote: Not that I know the first thing about singularity-ce, but what I can see (or what I think I can see) is that you're trying to run a bash command (apt-get -y update) from the singularity-ce terminal, which is why (or so I assume) it's not going to work.
Singularity is just another environment that is embedded into Linux and allowing me to use Linux shell commands as they are.

(Sep-20-2022, 09:44 PM)rob101 Wrote: tbh, I don't think that this is not the correct Forum site for this topic, but as there's been no moderator intervention, maybe I'm wrong about that (also?).
The point is that to be able to run/compile python scripts inside the singularity containers.

Recently, I pulled a python container named <pre>python-3.9.6.sif</pre>. But anytime, I try to run my python script inside, I see the following error
Error:
/usr/local/bin/python: can't open file '/home/(my user name)/Downloads/singularity-ce-3.10.2/examples/build-singularity/build-singularity/main_ST_Model_ECDGCA3_NG.py': [Errno 13] Permission denied
If I try to run as root, then I see the following
Error:
/usr/local/bin/python: can't open file '/root/main_ST_Model_ECDGCA3_NG.p': [Errno 2] No such file or directory