R
RunPod3w ago
nish

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
Jason
Jason3w ago
Hook? As an optional background step meaning?
riverfog7
riverfog73w ago
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
nish
nishOP3w ago
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).
riverfog7
riverfog73w ago
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

Did you find this page helpful?