Post Startup Download Scripts
I have a docker image built on BASE runpod/base:0.6.3-cuda11.8.0. After all the startup etc is done, I want to download a few models etc as an optional background step. is there a hook to do this?
4 Replies
Hook?
As an optional background step meaning?
make the start ccommand
bash -c 'source <(https://domain.com/sccript.sh) && /start.sh'
and then make script.sh do the things you wnat
this downloads the model before start.sh
bash -c 'source <(https://domain.com/sccript.sh) & /start.sh'
does it cocurrently
oh. so just change the CMD of my docker image to invoke script.sh first, and then start.sh, basically?
there was also a pre_start.sh in the images, and in the derivative images like Comfy, the pre_start.sh was invoking the additional services. So I just ran my "download_models.sh" as a background script execution, and that seemed to do the trick.
would be nice to have a built in PROVISIONING_SCRIPT hook available on the base image, though (vast.ai images have that approach).
I just do this with a custom autoinstall script that does everything u want based on the options provided
This would be nice too because i dont have to modify the CMD