mirror of
https://github.com/clearml/clearml-session
synced 2025-05-05 20:44:57 +00:00
Add jupyter server configuration
This commit is contained in:
parent
48960acbe7
commit
7378a30d26
@ -582,6 +582,14 @@ def start_jupyter_server(hostname, hostnames, param, task, env, bind_ip="127.0.0
|
||||
print(
|
||||
"Running Jupyter Notebook Server on {} [{}] port {} at {}".format(hostname, hostnames, port, cwd)
|
||||
)
|
||||
additional_args = [
|
||||
"--ServerApp.token='{}'".format(param.get("jupyter_token")) if param.get("jupyter_token") is not None else "",
|
||||
"--ServerApp.password=''".format(param.get("jupyter_password")) if param.get("jupyter_password") is not None else "",
|
||||
"--ServerApp.allow_origin=*".format(param.get("jupyter_allow_origin")) if param.get("jupyter_allow_origin") is not None else "",
|
||||
"--ServerApp.base_url={}".format(param.get("jupyter_base_url")) if param.get("jupyter_base_url") is not None else "",
|
||||
]
|
||||
additional_args = [a for a in additional_args if a]
|
||||
|
||||
process = subprocess.Popen(
|
||||
[
|
||||
sys.executable,
|
||||
@ -594,7 +602,7 @@ def start_jupyter_server(hostname, hostnames, param, task, env, bind_ip="127.0.0
|
||||
bind_ip,
|
||||
"--port",
|
||||
str(port),
|
||||
],
|
||||
] + additional_args,
|
||||
env=env,
|
||||
stdout=fd,
|
||||
stderr=fd,
|
||||
@ -1324,6 +1332,7 @@ def verify_workspace_storage_access(store_workspace, task):
|
||||
# do not throw the exception itself, because it will confuse readers
|
||||
exit(1)
|
||||
|
||||
|
||||
class SyncCallback:
|
||||
pipe_file_name_c = "/tmp/clearml_sync_pipe_c"
|
||||
pipe_file_name_r = "/tmp/clearml_sync_pipe_r"
|
||||
|
Loading…
Reference in New Issue
Block a user