After this I used to run commands like these: cd oneraM6/
or mpirun -np 8 python runScript.py 2>&1 | tee logOpt.txt
Now I want to do all of this using a python script, i.e. starting container, then running commands in container’s bash shell from python script. Is these any documentation about it?
I’ve understood that you want a single command line to start the container and run in it a given set of commands. This is what I’ve suggested by referencing the example from powerlevel10k.
Now, remains, the python part, the easiest one I think.
This (above) is my python script. When I run this script, it starts the container and also runs the “mpirun -np 8 python runScript_v2.py”. But the main problem, I am facing is, I have to provide full path of mpirun or python as shown in code.
But if I use windows command prompt, I don’t need to provide full paths. In windows command prompt, I can simply put my commands as follows: