What is the lightest weight, best practice / pattern for using rails, not django/flask, to call python-based programs (e.g. python machine learning inference such as tensorflow/pytorch, or other scientific computing like scikit or numpy) on a lean server (keeping costs down)?