侧边栏壁纸
  • 累计撰写 125 篇文章
  • 累计创建 16 个标签
  • 累计收到 4 条评论

目 录CONTENT

文章目录
Linux   

好用的远程神器 - Jupyter lab

Jupyter Lab 是一个基于Web的交互式开发环境,可以用于编写和运行Jupyter笔记本、代码编辑、数据处理和可视化等操作。它是 Jupyter Notebook 的升级版,提供了更加灵活和强大的功能。在Jupyter Lab中,用户可以通过侧边栏、标签页等方式来组织和管理多个笔记本、代码文件和数据文件等,同时还可以通过插件来扩展其功能,例如添加新的编辑器、终端、数据可视化工具等。Jupyter Lab的优点在于它的灵活性和可扩展性,使得它成为了数据科学、机器学习、人工智能等领域中的重要工具之一。

安装

  • 更新 pip3 並安裝 jupyter lab
sudo -H pip3 install --upgrade pip
pip3 install jupyter jupyterlab
sudo reboot
  • 生成 jupyter lab 配置文件,其中包含一些可修改的设置。
jupyter lab --generate-config
  • 修改配置文件 vim ~/.jupyter/jupyter_lab_config.py,是得 ip 顺利访问
c.ServerApp.allow_origin = '*' 
c.ServerApp.ip = '0.0.0.0' 
  • 设置密码
jupyter lab password
  • 设置开机启动,创建 jupyter.service 文件
sudo vim /etc/systemd/system/jupyter.service
  • 填入以下內容
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
User=jetson   # 当前用户名
ExecStart=/home/jetson/.local/bin/jupyter-lab --port 8888 --no-browser
WorkingDirectory=/home/jetson/
[Install]
WantedBy=default.target
  • 启动启动服务,并检查
sudo systemctl enable jupyter
sudo systemctl start jupyter
sudo systemctl status jupyter # 正常会显示 active
  • 利用 ip+8888 即可访问
0

评论区