# Jupyter app tutorial: how to build in additional kernel support?

**URL:** <https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733>\
**Category:** Get Help\
**Created:** [February 17, 2020, 4:47pm UTC](https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733 "2020-02-17T16:47:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonbuechler](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jasonbuechler/32/302_2.png) [@jasonbuechler](https://discourse.openondemand.org/u/jasonbuechler)\
**Post date:** [February 17, 2020, 4:47pm UTC](https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733/1 "2020-02-17T16:47:21Z")

</div>

Hi all,

I stood up our OOD-Jupyter app a while back using [the interactive apps tutorial](https://osc.github.io/ood-documentation/master/app-development/tutorials-interactive-apps/add-jupyter.html), with minimal modifications, and am quite happy with the results. We’re now ramping up to replace our jupyterhub with OOD, but it looks like I need some guidance getting Jupyter to “see” the/any kernels available to it.

If I’m not mistaken, lines 231-271 of [script.sh.erb from the bc\_osc\_jupyter repo](https://github.com/OSC/bc_osc_jupyter/blob/master/template/script.sh.erb#L231-L271) demonstrate what’s necessary to include additional kernels (e.g. bash, matlab, etc) into Jupyter, but I think I may be missing something as I struggle to interpret the erb/ruby.

Could I beg of someone to outline the bare necessities of prepping/using additional kernels, that one might need to built into the tutorial version of the Jupyter app, please and thank you? (…very, very, very much!)

If it helps, kernels used by our jupyterhub sit in our nfs /packages Environment Modules library, and we’re at OnDemand version: v1.6.20 | Dashboard version: v1.35.3.

(For completeness, [this issue](https://github.com/OSC/bc_osc_jupyter/issues/7) looks relevant but also looks like it’s specific to the aforementioned OSC-specific erb file in use at Owens.)

---

<div class="post-metadata">

**Author:** ![mcuma](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mcuma/32/171_2.png) [@mcuma](https://discourse.openondemand.org/u/mcuma)\
**Post date:** [February 18, 2020, 5:10am UTC](https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733/2 "2020-02-18T05:10:31Z")

</div>

Jason,

we have a handful of other kernels (R, Matlab), and all that’s needed is to

- install the kernel into the Jupyter - each has its own way of doing that it usually boils down to installing a Python module and modifying a Jupyter config file
- load the needed environment (lmod) modules (e.g. R, Matlab) in the script.erb file

I don’t think we needed to do anything more than that.

As for Virtual Environments, I just replied on that the other day, I am not a big fan of those - prefer independent miniconda installations loadable with separate environment modules. I describe our Jupyter setup in that reply.

HTH,  
MC

---

<div class="post-metadata">

**Author:** ![jasonbuechler](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jasonbuechler/32/302_2.png) [@jasonbuechler](https://discourse.openondemand.org/u/jasonbuechler)\
**Post date:** [February 19, 2020, 9:22pm UTC](https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733/3 "2020-02-19T21:22:23Z")

</div>

Thanks for your response, @mcuma. With your verification of how things were supposed to work, I went looking more carefully at my setup and found the problem 🙂

…which I’ll share here in case anyone else runs into the issue, in the future:

```auto
  # /var/www/ood/apps/sys/jupyter/form.yml
  
  # Set the corresponding modules that need to be loaded for Jupyter to run
  #
  # @note It is called within the batch job as `module load <modules>`
  # if defined
  #
  # JB note: qiime's own python will take precendence
  # and ignore the explicit anaconda3 kernels
  # unless you load qiime before anaconda3

  modules: "qiime2/2019.10 anaconda3"

```

We wanted our jupyter app to have qiime available by default, so I had listed qiime2 after anaconda on the `modules:` line… but that ordering made $PATH find qiime’s python before anaconda’s… and so the kernels within anaconda’s python weren’t found.

Thanks again!

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:34pm UTC](https://discourse.openondemand.org/t/jupyter-app-tutorial-how-to-build-in-additional-kernel-support/733/4 "2022-05-26T15:34:40Z")

</div>


