You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I wanted to setup a Singularity container such that a custom bashrc file is executed after entering the container. My current attempts were to use the exec command when calling singularity as follows singularity exec -B /mnt:/mnt <path_to_container>.sif bash -c "exec bash; source ~/tools/singularity/container_bashrc"
However, the prompt still shows "singularity >". Once in the container, sourcing the container_bashrc works as expected.
This question was asking something similar https://answers.ros.org/question/321775/automatically-source-different-setupbash-files-when-a-starting-singularity-image/. The difference that I see here is that he seemed to build a sandbox from scratch. In my case, I already have a sandbox, and I want to build the sandbox later into a .sif image that is used to run a shell version of the container. Could I add the container_bashrc into the sandbox folder and execute it on start-up with the .run service?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I wanted to setup a Singularity container such that a custom bashrc file is executed after entering the container. My current attempts were to use the exec command when calling singularity as follows
singularity exec -B /mnt:/mnt <path_to_container>.sif bash -c "exec bash; source ~/tools/singularity/container_bashrc"
However, the prompt still shows "singularity >". Once in the container, sourcing the container_bashrc works as expected.
This question was asking something similar https://answers.ros.org/question/321775/automatically-source-different-setupbash-files-when-a-starting-singularity-image/. The difference that I see here is that he seemed to build a sandbox from scratch. In my case, I already have a sandbox, and I want to build the sandbox later into a .sif image that is used to run a shell version of the container. Could I add the container_bashrc into the sandbox folder and execute it on start-up with the .run service?
Beta Was this translation helpful? Give feedback.
All reactions