边缘模式下jupyter打不开的问题

This commit is contained in:
pengluan 2022-06-08 19:40:34 +08:00
parent 4911fae93c
commit ad855c4a06
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# docker build -t tencentmuisc/notebook:vscode-ubuntu-node-base -f Dockerfile-node-base .
# docker build -t ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-node-base -f Dockerfile-node-base .
ARG NODE_VERSION=12.18.3

View File

@ -75,7 +75,10 @@ class Notebook(Model,AuditMixinNullable,MyappModelBase):
if SERVICE_EXTERNAL_IP:
service_ports = 10000 + 10 * self.id
host = "http://%s:%s"%(SERVICE_EXTERNAL_IP,str(service_ports))
url = '/notebook/jupyter/%s/lab/tree/mnt/%s'%(self.name,self.created_by.username)
if self.ide_type=='theia':
url = "/" + "#/mnt/" + self.created_by.username
else:
url = '/notebook/jupyter/%s/lab/tree/mnt/%s'%(self.name,self.created_by.username)
return Markup(f'<a target=_blank href="{host}{url}">{self.name}</a>')
@property