I am trying to start a singularity container and then run a python script from within that container. The commands work individually if I run them outside, but as soon as I put them in a shell script and run the shell script, the python script does not get executed until I close the singularity environment. This is the script
#!/bin/bash
singularity run /home/___/singularity_containers/singularity_container.simg bash
python3 /home/___/__/__/src/hello_world.py
If I run this with ./my_script.sh it enters the singularity environment, but does not execute the python code until I manually "exit" the singularity environment. How would I chain the commands so that the python script gets executed from within the singularity environment?