question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to create a shared conda environment

See original GitHub issue

Update by Erik 2021-10-25

A sensible pattern to do this is by doing either…

$ sudo -E conda install -c conda-forge nb_conda_kernels
$ sudo -E conda create -c conda-forge -n <conda-env-name> python ipykernel
$ sudo tljh-config reload hub

Or following #697, by doing…

$ sudo -E mamba install nb_conda_kernels
$ sudo -E mamba create -n <conda-env-name> python ipykernel <other packages>
$ sudo tljh-config reload hub

Original issue

I’d like to to deploy jupyterhub on a bare-metal server using TLJH (BTW, thanks for providing this well-documented tool, this looks like it will make things a lot easier for me!).

In our team we’re used to maintain separate conda environments for each of our projects, and use nb_conda_kernels to easily switch between kernels within the notebook or lab interface. This is much easier to maintain than one single, big conda environment.

As I understand, TLJH only provides one shared conda environment. How easy/hard would it be to add support in TLJH for multiple conda environments shared between all users + nb_conda_kernels?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:20

github_iconTop GitHub Comments

4reactions
jetiltoncommented, May 6, 2020
$ sudo -E conda install -c conda-forge nb_conda_kernels
$ sudo -E conda create -n myproject python numpy scipy ipykernel -c conda-forge
$ sudo tljh-config reload hub

@benbovy The above did not work for me. Did you do this in the tljh termina? I did and restarted my notebook I still only see Python 3 as my only option. Has there been any follow up on documentation?

Thanks

EDIT

Nevermind. I did the above, then nothing seemed to work, went to control panel and stopped/started my server and everything works as expected!

2reactions
benbovycommented, Sep 13, 2019

So I tested it on a fresh tljh deployment and it worked well! I did no more than

$ sudo -E conda install -c conda-forge nb_conda_kernels
$ sudo -E conda create -n myproject python numpy scipy ipykernel -c conda-forge
$ sudo tljh-config reload hub

It would be great to have a custom hook to create new conda environments! That would be very useful for creating plugins that provide multiple environments!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conda environments
A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated spaces for them that...
Read more >
Sharing Environments – Introduction to Conda for (Data ...
Objectives. Create an environment from a YAML file that can be read by Windows, Mac OS, or Linux. Create an environment based on...
Read more >
Shared Conda Environment | RCpedia
By default, conda creates a new environment folder and installs all the packages inside .conda folder in your home directory but this space...
Read more >
Conda create environment and everything you need to know ...
1. Create conda environment · 2. Activate the environment · 3. Install more packages · 4. See the list of packages and environments...
Read more >
How to share conda environments across platforms
Recommendation: manually create an environment.yaml file and specify or pin only the dependencies that you care about. Let the conda solver ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found