# $WORKDIR and extra\_jupyter\_args

**URL:** <https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031>\
**Category:** Get Help\
**Tags:** question\
**Created:** [July 22, 2020, 5:43am UTC](https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031 "2020-07-22T05:43:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![datakid](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/datakid/32/248_2.png) [@datakid](https://discourse.openondemand.org/u/datakid)\
**Post date:** [July 22, 2020, 5:43am UTC](https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031/1 "2020-07-22T05:43:38Z")

</div>

We’ve ended up with an `extra_jupyter_args` in our `form.yml` from the documentation for [deploying a Jupyter Notebook app](https://osc.github.io/ood-documentation/master/app-development/tutorials-interactive-apps/add-jupyter/customize-attributes.html).

It doesn’t render as anything in the form from what we see.

We would like for researchers to be able to launch in their `$WORKDIR` of choice, and was hoping to use this field to grab some context, then (I presume) change [line 13 in template/before.sh.erb](https://github.com/OSC/bc_osc_jupyter/blob/68d625b8c078474854a75a6ffb5d92f2cee6d9b1/template/before.sh.erb#L13) to something like

```auto
export NOTEBOOK_ROOT=<%= context.extra_jupyter_args %>

```

Have I missed something? This is my first time around with Ruby, am still figuring things out, trying very hard not to map python/django concepts wholesale.

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [July 22, 2020, 10:15am UTC](https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031/2 "2020-07-22T10:15:04Z")

</div>

Its a problem with the way the app works. The form.yml only displays a field to the user if in the attributes section you actually specify a yaml map (i.e. hash) with the input type and other possible attributes. If instead of a map its set to a value, the form element is never presented to a user and the value is used instead. In that tutorial’s case we have `extra_jupyter_args: ""` so that is hidden. You could just delete `extra_jupyter_args: ""` in the form.yml and it would appear as a text box - since it is listed in the `form:` array it would use the default element which is a text box.

You could also do what we have here [https://github.com/OSC/bc\_osc\_codeserver/blob/9519ced8ec8f044d3155305296bb0964a1a045b9/form.yml#L8-L13](https://github.com/OSC/bc_osc_codeserver/blob/9519ced8ec8f044d3155305296bb0964a1a045b9/form.yml#L8-L13). In order to do that you would add this file picker component to the app [https://github.com/OSC/bc\_js\_filepicker/releases/tag/v0.4.6](https://github.com/OSC/bc_js_filepicker/releases/tag/v0.4.6). There is a built asset at the bottom of that release called “form.js” which you can just drop in the root of the app alongside the form.yml. (Whatever is in the form.js file gets placed below the web form in an anonymous function, so you can put whatever javascript you want there.) For convenience, here is a link to the latest asset to curl or wget: [https://github.com/OSC/bc\_js\_filepicker/releases/download/v0.4.6/form.js](https://github.com/OSC/bc_js_filepicker/releases/download/v0.4.6/form.js)

---

<div class="post-metadata">

**Author:** ![datakid](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/datakid/32/248_2.png) [@datakid](https://discourse.openondemand.org/u/datakid)\
**Post date:** [July 24, 2020, 12:51am UTC](https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031/3 "2020-07-24T00:51:08Z")

</div>

Got both working, decided to use the second option - thanks.

---

<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:43pm UTC](https://discourse.openondemand.org/t/workdir-and-extra-jupyter-args/1031/4 "2022-05-26T15:43:13Z")

</div>

Closed on May 26, 2022, 3:43pm UTC


