Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you set environment variables? #1627

Open
themire opened this issue Apr 19, 2024 · 4 comments
Open

How do you set environment variables? #1627

themire opened this issue Apr 19, 2024 · 4 comments

Comments

@themire
Copy link

themire commented Apr 19, 2024

There is a page listing out all the environment variables but no reference in the docs about cog.yaml about where and how these should be included.

I've tried to figure it out from old PRs but couldn't find anything conclusive.

@zeke
Copy link
Member

zeke commented Apr 19, 2024

Thanks for reporting. Cog's support for env/secrets at build time and run time is not yet well documented.

Can you share a bit more detail about what you're trying to accomplish?

If you want to set environment variables when running a model (not building), you can pass the -e flag to cog predict or cog run. See #1253

If you want to inject secrets into your built image, see https://github.com/replicate/cog/blob/main/docs/private-package-registry.md

@themire
Copy link
Author

themire commented Apr 20, 2024

Thanks. I am trying to trying to set the WEBHOOK_AUTH_TOKEN as documented here.

@zeke
Copy link
Member

zeke commented Apr 23, 2024

I see. Are you running Cog on your own infrastructure and wanting to be able to send webhooks?

@themire
Copy link
Author

themire commented Apr 25, 2024

Yes I am. The webhooks are all working fine. I just would like to be able to set this WEBHOOK_AUTH_TOKEN for extra security at my webhook endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants