简体   繁体   English

Streamlit 浏览器应用程序无法从 Sagemaker 终端打开

[英]Streamlit Browser App does not open from Sagemaker Terminal

I am working on building a movie recommendation engine on aws sagemaker environment and i plan to show working demonstration for the same.我正致力于在 aws sagemaker 环境上构建电影推荐引擎,我计划展示相同的工作演示。 I am trying to use the streamlit library for running the app.我正在尝试使用 streamlit 库来运行应用程序。

After running the command: streamlit run app.py, it provides me 2 urls ie Network and External urls.运行命令后:streamlit run app.py,它为我提供了 2 个 url,即网络和外部 url。

The issues is none of the url works.问题不是 url 作品。 It results in connection timed out, the server does not respond.导致连接超时,服务器没有响应。

Please help请帮忙

You can try the following url https://{NOTEBOOK_URL}/proxy/8501/ .您可以尝试以下 url https://{NOTEBOOK_URL}/proxy/8501/ You may have to change the proxy based on which proxy is used in the Network and External urls您可能需要根据网络和外部 url 中使用的代理来更改代理

I did the following steps and it worked for me:我执行了以下步骤并且对我有用:

source /home/ec2-user/anaconda3/bin/activate JupyterSystemEnv
pip uninstall --yes nbserverproxy
pip install --upgrade jupyter-server-proxy
sudo systemctl restart jupyter-server

The last command you write will close your terminal in Sagemaker, so you'll have to open up a new terminal window and run the following commands:您编写的最后一条命令将关闭您在 Sagemaker 中的终端,因此您必须打开一个新终端 window 并运行以下命令:

source activate pytorch_p39
pip install streamlit==1.11.0

Versions greater than 1.11.0 of streamlit don't seem to work unfortunately.不幸的是,大于 1.11.0 的 streamlit 版本似乎不起作用。 This seems to be a problem with the jupyter-server-proxy library.这似乎是 jupyter-server-proxy 库的问题。

If your run:如果你跑步:

streamlit hello --browser.serverAddress=0.0.0.0

The app should be here https://{NOTEBOOK_URL}/proxy/8501/该应用程序应该在这里https://{NOTEBOOK_URL}/proxy/8501/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法打开 AWS Sagemaker Studio - Unable to open AWS Sagemaker Studio 在 SageMaker 笔记本实例中打开 jupyter 是否需要 sagemaker:CreatePresignedDomainUrl? - Is sagemaker:CreatePresignedDomainUrl required to open jupyter in SageMaker notebook instance? 如何从 Streamlit 应用程序中保存在云存储中的文件的下拉菜单中使用 st.selectbox() 到 select 文件? - How to use st.selectbox() to select file from drop down menu from files saved in cloud storage in Streamlit app? 无法在 AWS Sagemaker 上打开 Jupyter Notebook 实例 - Unable to open Jupyter Notebook instance on AWS Sagemaker sagemaker python sdk (training jobs)是否继承了边缘节点的所有权限? - Does sagemaker python sdk (training jobs) inherit all permissions from the edge node? Sagemaker studio 无法加载 - Sagemaker studio does not load up ipydatagrid 小部件不显示在 SageMaker Studio 中 - ipydatagrid widget does not display in SageMaker Studio Streamlit 应用程序以“请稍候...”停止,然后停止 - The Streamlit app stops with "Please wait... " and then stops 将整个文件夹从 AWS sagemaker 下载到笔记本电脑 - Download an entire folder from AWS sagemaker to laptop 在 sagemaker 中从 S3 自定义安装 package - Custom package installation from S3 in sagemaker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM