uktrade / fargatespawner

Spawns JupyterHub single user servers in Docker containers running in AWS Fargate
MIT License
47 stars 21 forks source link

set environment variable from options_form #22

Closed baconsi closed 2 years ago

baconsi commented 2 years ago

I have tried to use a field from an options form to add an environment variable to a new notebook but cannot work out how

if I set the following i get an error, any pointers would be great, i also cant see how to add the value to an environment variable ourside the get_run_task_args 'environment': [ { 'name': 'newvar', 'value': spawner.user_options['key'][0] }, { 'name': name, 'value': value, } for name, value in spawner.get_env().items() ],