jupyterhub / jupyterhub/batchspawner
Voila doesn't render notebooks with JupyterHub and BatchSpawner
- Dominant language
- Python
- Stars
- 207
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
### Bug description
Dear all,
I am experiencing issues while running Voila from a Jupyter session started via batchspawner.
I suspect a configuration / setup problem but alone I can't figure out what I can try to troubleshoot.
In my setup, Voila runs perfectly fine
* if voila or jupyterlab are started directly
* if voila or jupyterlab are accessed via jupyterHub using the SimpleLocalProcessSpawner spawner
Unfortunately with BatchSpawner, the Voila landing page starts, notebooks are open but the voila render doesn't start at all.
I can't find Jupyter or Javascript console logs to troubleshoot.
Does anyone have a suggestion for troubleshooting / configuration change?
Many thanks,
Gianluca
### Your personal set up
My configuration is the following:
* jupyterhub 1.3.0
* jupyterlab 2.2.9
* jupyter_server 1.2.1
* batchspawner 1.1.0.dev0
This is a minimalistic jupyterhub_config.py file to reproduce this behaviour:
```python
from traitlets import Unicode
from jupyterhub.spawner import SimpleLocalProcessSpawner
import batchspawner
IP = os.getenv("HOSTNAME")
c.JupyterHub.ip = IP
c.JupyterHub.hub_ip = IP
c.JupyterHub.port = 26000
c.JupyterHub.hub_port = 26001
c.ConfigurableHTTPProxy.api_url = f"http://{IP}:26002"
c.Spawner.environment = {
"JUPYTERHUB_SINGLEUSER_APP": "jupyter_server.serverapp.ServerApp",
}
c.JupyterHub.authenticator_class = "jupyterhub.auth.PAMAuthenticator"
class MyBatchSpawner(batchspawner.GridengineSpawner):
req_sgeroot = Unicode(os.getenv("SGE_ROOT", "")).tag(config=True)
req_hostname = Unicode(IP).tag(config=True)
batch_script = Unicode(
"""#!/bin/sh
#$ -terse
#$ -N TEST
#$ -S /bin/sh
#$ -j y
#$ -notify
#$ -wd {homedir}
#$ -v {keepvars}
export NO_PROXY={hostname},$NO_PROXY
export no_proxy={hostname},$no_proxy
{cmd}
"""
).tag(config=True)
batch_submit_cmd = Unicode("SGE_ROOT={sgeroot} {sgeroot}/bin/lx-amd64/qsub").tag(
config=True
)
batch_query_cmd = Unicode(
"SGE_ROOT={sgeroot} {sgeroot}/bin/lx-amd64/qstat -xml"
).tag(config=True)
batch_cancel_cmd = Unicode(
"SGE_ROOT={sgeroot} {sgeroot}/bin/lx-amd64/qdel {job_id}"
).tag(config=True)
def parse_job_id(self, output):
return output.split(".")[0]
c.JupyterHub.spawner_class = MyBatchSpawner
c.Spawner.ip = "0.0.0.0"
c.Spawner.debug = True
c.JupyterHub.log_level = "DEBUG"
```
Contributor guide
Assessment
This issue has not been assessed yet.