Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2021-10-15 18:39:16

APereira
Member
Registered: 2021-09-30
Posts: 29

as_run in container take space

Hi guys,

I'm currently working on Mechanical Design Optimization with Salome-Meca / Code_Aster / Python. In this purpose I run several simulations in batch mode. To do so I use the command "SalomeLauncher (extract from singularity run) -- shell -- as_run --run ExportFile". My problem is that each time I run the command, a container is build in a sort of disk, taking 5.5Go on the disk and does not self destroyed at the end of the run. So after several runs, I have some trouble to create new container and the simulation doesn't start. Do you have any hints to solve my problem.

Thanks you for your help.

Offline

#2 2021-10-15 18:51:17

ing.nicola
Member
Registered: 2017-12-11
Posts: 139

Re: as_run in container take space

try whit this:

singularity run -B /tmp:/local00/tmp <path_to_image>.sif shell -- as_run --test forma01a

could be faster..

and/or

./script_launcher -- kill 2877

Last edited by ing.nicola (2021-10-15 18:56:32)

Offline

#3 2021-10-15 19:39:16

ing.nicola
Member
Registered: 2017-12-11
Posts: 139

Re: as_run in container take space

you can also write your optmization.py script , place it in /home and

singularity exec -B /home:/home <path_image>.sif python optimization.py

it mount one time the container and execute multiple time as_run.
this is very faster.

Last edited by ing.nicola (2021-10-15 19:41:13)

Offline

#4 2021-10-18 08:58:19

APereira
Member
Registered: 2021-09-30
Posts: 29

Re: as_run in container take space

ing.nicola wrote:

you can also write your optmization.py script , place it in /home and

singularity exec -B /home:/home <path_image>.sif python optimization.py

it mount one time the container and execute multiple time as_run.
this is very faster.

This solution would be perfect but I use an external Python to run simulations, is it a problem ? I mean, its my python that several time call the command "singularity run fic.sif ..... as_run My export"

Offline

#5 2021-10-18 14:42:26

ing.nicola
Member
Registered: 2017-12-11
Posts: 139

Re: as_run in container take space

if you made writable the image , you can install your python version or conda , inside the container. You have to use an internal container python version.  See "Overlay embedded in SIF " in https:  //sylabs.io/guides/3.6/user-guide/persistent_overlays.html

Last edited by ing.nicola (2021-10-18 14:44:02)

Offline

#6 2021-10-18 18:26:28

APereira
Member
Registered: 2021-09-30
Posts: 29

Re: as_run in container take space

Thanks, I'll try this !

Offline

#7 2022-05-11 19:03:19

JFall
Member
Registered: 2022-01-28
Posts: 2

Re: as_run in container take space

Hello APereira. Were you able to solve this problem (running multiples simulations inside one container)?

Offline

#8 2022-05-17 09:18:32

APereira
Member
Registered: 2021-09-30
Posts: 29

Re: as_run in container take space

Hello,

In order to solve my problem, I use a python library that can handle containers : spython. And I simply import Client from spython.main.
At this point you can manage instances of container and run commands on them.

regards

Offline