python – How can I git clone a repository, change directory, and install its requirements.txt file using requirements.txt

I have to run the following lines to install a github repo:

git clone
cd /content/speechbrain/
pip install -r requirements.txt
pip install -e .

I want to create a requirements.txt file in my local project that when ran, executes these commands. How can I do this?

I tried searching but couldn’t find anything, any help will be appreciated.