I want to be able to do this as well. More specifically, I want to install Torchserve, for example, along with the rest of this Animated Drawings code:
That Animated Drawings repository has an example for headless rendering, I would expect that to be possible in a Fly machine. In your Dockerfile you would need to include installing any necessary prerequisites (like torchserve). You could also attach a volume to have persistant disk.