Foundation Model Engineering: From Theory to Production