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

Define extra Python env requirements on top of root directory requirements.txt #286

Closed
biphasic opened this issue Sep 1, 2023 · 5 comments

Comments

@biphasic
Copy link

biphasic commented Sep 1, 2023

Not all the dependencies that might be necessary in a binder environment are always present in the root requirements.txt, sometimes they are split into other files.

Proposed change

It would be great to be able to define extra environment dependencies that are not just in the root requirements.txt file. My library has another requirements.txt in the docs folder, to run the notebooks for example.

Alternative options

Who would use this feature?

Anyone who has separate dependencies for testing/documentation

(Optional): Suggest a solution

Make it possible to define extra environment files with the help of a .binder.yaml file

@welcome
Copy link

welcome bot commented Sep 1, 2023

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! 🎉

@consideRatio
Copy link
Member

Your requirements.txt file can link to other requirements.txt files i think, right?

@biphasic
Copy link
Author

biphasic commented Sep 1, 2023

that could be, but my main point is that the base requirements of the package are not always the same as the ones needed in a Binder env. In my case, the tutorial notebooks that I'd like users to be able to run require other large packages that I don't want to include in the root requirements.txt

@betatim
Copy link
Member

betatim commented Sep 1, 2023

You can create a .binder/ directory in your repository and files in that will take precedent over the repo root. That lets you have different requirements for tutorial notebooks and such.

@biphasic
Copy link
Author

biphasic commented Sep 1, 2023

this worked perfectly! As I didn't see any note about that in the docs, I added a line in a PR: binder-examples/requirements#25

@biphasic biphasic closed this as completed Sep 1, 2023
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

3 participants