-
Notifications
You must be signed in to change notification settings - Fork 0
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
Auto mp api key #156
base: main
Are you sure you want to change the base?
Auto mp api key #156
Conversation
@@ -41,6 +41,9 @@ spec: | |||
- mountPath: /home/jovyan/dask-worker-space | |||
name: shared-scratch | |||
subPath: catlas/dask-worker-space | |||
- mountPath: /home/jovyan/.pmgrc.yaml | |||
name: workspace-inference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this will work? The pmgrc.yaml is setup for use with MPRester from pymatgen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the best route might be to have people store their api keys as github secrets: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be clear, these would not be github secrets they would be in kubernetes. Regardless, that feels just as clunky as the current solution? We could have a settings.py file where people add there MP_API key and we can imported where needed. i.e. from catlas.settings import MP_API_KEY
. At least that would keep in central so you wouldnt have to make the change to every single worker config yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and try to read from environment variables first so we can export it to the workers for github actions if needed?
Infer api key from pmgrc.yaml. It looks like you can't combine "apply" with {{ }} syntax, unsure if there are other workarounds but this seems fine and we shouldn't be using mprester too much.