Running a local bash function on a remote machine

#productivity #engineering Whenever you want to deal with cloud offerings (like #aws et. al.) you interact with the machines through an #ssh session. It is very likely that right after you connect to the machine you want some steps to be performed on the remote host. For example, if you plan to switch the instance type like described in [[20220128192053]] Switch GPU to CPU using the `aws-cli`, after the machine is up you want to start #jupyer, #htop and some GPU profiling too

Switch GPU to CPU using the aws-cli

It is a well known fact that machine learning (and #deep-learning in particular) needs lots of compute power. If conditions are right (i.e. enough data is involved) a GPU enabled machine might be needed to speed up training (and thus have a faster iteration cycle). Having a GPU though is quite expensive nowadays so most researchers use one through cloud offerings (like AWS, Azure or Google Cloud). In general, this is cheaper than buying and setting up your own dedicated machi