本地访问autodl的jupyter notebook

建立环境并安装jupyter

conda create --name medkg python=3.10

source activate medkg

pip install jupyter

安装完成后,输入jupyter notebook --generate-config

输入ipython,进入python

In [2]: from jupyter_server.auth import passwd

In [3]: passwd(algorithm='sha1')

返回

记住密码,并输入exit();退出

编辑刚才的config文件 vim /root/.jupyter/jupyter_notebook_config.py

在最末尾插入

c.ServerApp.ip = '0.0.0.0'

c.ServerApp.password = ''#填写刚才生成出来的那个密码字符串

c.ServerApp.open_browser = False

c.ServerApp.port = 6006

c.ServerApp.allow_remote_access = True

输入!wq,回车,保存,

返回原来的控制台,重新输入jupyter notebook --allow-root

同时打开

下载autodl 的客户端,输入登录指令和密码,

点击最下面的访问地址,会弹出一个让你输入密码的页面,输入当时你本身设置的密码,不是sha1密码,即可访问。小记一下做备忘。

参考文献

链接: 1

链接: 2

相关推荐
用户83562907805137 分钟前
使用 C# 在 Excel 中创建数据透视表
后端·python
码路飞3 小时前
FastMCP 实战:一个 .py 文件,给 Claude Code 装上 3 个超实用工具
python·ai编程·mcp
dev派5 小时前
AI Agent 系统中的常用 Workflow 模式(2) Evaluator-Optimizer模式
python·langchain
前端付豪7 小时前
AI 数学辅导老师项目构想和初始化
前端·后端·python
用户0332126663677 小时前
将 PDF 文档转换为图片【Python 教程】
python
悟空爬虫9 小时前
UV实战教程,我啥要从Anaconda切换到uv来管理包?
python
dev派9 小时前
AI Agent 系统中的常用 Workflow 模式(1)
python·langchain
明月_清风11 小时前
从“能用”到“专业”:构建生产级装饰器与三层逻辑拆解
后端·python
曲幽20 小时前
数据库实战:FastAPI + SQLAlchemy 2.0 + Alembic 从零搭建,踩坑实录
python·fastapi·web·sqlalchemy·db·asyncio·alembic
用户8356290780511 天前
Python 实现 PowerPoint 形状动画设置
后端·python