Closed ckadner closed 7 years ago
@chuyqa -- there is a similar code change in your fork, this PR would be a more generic approach
@parente - this PR is an extension to Pass environment metadata to kernels on POST /api/kernels #128 in Jupyter Kernel Gateway
Could you give it a look? Thanks in advance!
@ckadner I don't know how I missed this PR, but I did. Wow. Sorry for the long delay!
@parente -- Thanks for merging!
So, I am trying to use this notebook image in a JupyterHub environment. What I want to do is pass the $JPY_USER environment variable to KernelGateway. Is there a way I can do that? I have been trying to figure out how to put $JPY_USER into a $KERNEL_JPY_USER env variable at start time, but JupyterHub seems to have that locked down, so I can't figure out how to do that. Any thoughts?
@riceda195 JPY_USER
would need to be whitelisted with the kernel gateway as an environment variable that can be set via:
--JupyterWebsocketPersonality.env_whitelist=<List>
Default: []
Environment variables allowed to be set when a client requests a new kernel
IIRC, this extension would also need to change to pass that env var in the POST request.
Doc for the KG option is here http://jupyter-kernel-gateway.readthedocs.io/en/latest/config-options.html or here jupyter kernelgateway --help-all
.
@parente Thank you!
@parente this Pull Request adds the feature we discussed above to nb2kg https://github.com/jupyter/kernel_gateway_demos/pull/45
To enable this feature in Jupyter Kernel Gateway:
Pass environment metadata to kernels on POST /api/kernels #128