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

Auto mp api key #156

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Auto mp api key #156

wants to merge 5 commits into from

Conversation

KirbyBroderick
Copy link
Contributor

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.

@@ -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
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Contributor Author

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?

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

Successfully merging this pull request may close these issues.

2 participants