cog
cog copied to clipboard
Setup steps for container warm-up in cog.yaml
I have an image that requires setup.py to be run on container startup, as it builds CUDA extensions which doesn't work during the cog build process. Currently I am doing this within the setup function of my predictor, but this is not ideal and may not even work well for other use cases.
I propose something like a setup section (or perhaps setup.run) in cog.yaml that injects commands into an entrypoint script in the built container, effectively working like the build.run section but deferred until container startup. While this does codify what's effectively a workaround, I think it's something that will be needed in one fashion or another long term.