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

Add ability to define environment variables for builder pods. #1276

Open
ckarwicki opened this issue Mar 18, 2021 · 2 comments
Open

Add ability to define environment variables for builder pods. #1276

ckarwicki opened this issue Mar 18, 2021 · 2 comments

Comments

@ckarwicki
Copy link

ckarwicki commented Mar 18, 2021

Hi Binderhub, Jupyterhub Team,

First I would like to say what a great tool Binderhub is. The options it gives, the UI, the possibilities to use different ML tools, languages, packages and it is all open source!!!. Great software.

Proposed change

Not sure if this was already asked but I am trying to set custom environment variable that would be visible in builder pod when repo2docker is running. I am basically trying to set environment variable as PIP_EXTRA_INDEX_URL=https://user:[email protected]/path/api/pypi/python that comes from secret so that pip can install packages from my private repository when building an image based on requirements.txt

Alternative options

PodPresets would have worked but they were removed from Kubernetes 1.20.

Who would use this feature?

Anyone who wants to run notebooks that depend on custom Python packages that needs to be installed from private repository.

(Optional): Suggest a solution

It should be possible to expose env as a Python class traitlet so that it can be set and then append to it in the code. Right now the env is local to submit() function in https://github.com/jupyterhub/binderhub/blob/master/binderhub/build.py#L257 and I am not able to figure how to provide custom environment variable into the builder pod for repo2docker. Any suggestion would be appreciated.

@welcome
Copy link

welcome bot commented Mar 18, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@manics
Copy link
Member

manics commented Sep 20, 2021

As part of #1318 we are defining an interface for the Builder. This means it'll be much easier to extend and configure. For instance, a new Build.env traitlet could be added and its value set in the standard binderhub_config.py file.

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

No branches or pull requests

2 participants