您当前的位置: 首页 > 

RuiH.AI

暂无认证

  • 4浏览

    0关注

    268博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

英伟达Jetson Nano 开发(2)、Jupyter-Lab配置

RuiH.AI 发布时间:2022-01-29 14:01:50 ,浏览量:4

英伟达Jetson Nano 开发(2)、Jupyter-Lab配置
  • 前言
  • 安装JupyterLab
  • 设置密码
  • 生成Jupyter-lab配置文件
  • 设置配置文件
  • 远程开启JupyterLab
  • 后记

前言

本篇继续jetson nano开发记录。

JupyterLab是JupyterNotebook的下一代远程开发工具,非常适合在开发板上写python,配置方法也比较容易。

安装JupyterLab

先安装一下nodejs:

sudo apt install nodejs

使用pip安装jupyterlab:

pip3 install jupyterlab

然后可以查看版本:

jupyter-lab --version
设置密码

如果不设置jupyter-lab的密码,则登录时服务端(nano)会生成一个token,通过token进行身份验证。

因此还是设置密码比较方便,设置方法如下:

jupyter-lab password

出现设置密码,验证密码指示,然后就会自动生成一个密码文件~/.jupyter/jupyter_server_config.json

生成Jupyter-lab配置文件
jupyter-lab --generate-config

然后就在~/.jupyter/下生成了jupyter_lab_config.py配置文件

设置配置文件

因为要远程连接,因此有几个配置比较重要,修改jupyter_lab_config.py:

# 允许远程连接
c.ServerApp.allow_remote_access = True
# 允许远程连接者使用root权限
c.ServerApp.allow_root = True
# 服务器监听所有本机IP
c.ServerApp.ip = '0.0.0.0'
# 启动server不打开浏览器
c.ServerApp.open_browser = False
# 设置通信端口
c.ServerApp.port = 8080
# c.ServerApp.password 没必要设置,因为上面设置密码步骤时已经生成了密码文件
# c.ServerApp.root_dir 没必要设置,jupyter运行所在的文件夹
远程开启JupyterLab

首先,通过上位机SSH远程连接Jetson Nano打开JupyterLab服务端:

jupyter-lab

然后在上位机浏览器输入Jetson Nano的局域网IP + jupyter服务端口,比如

# nano局域网IP 192.168.10.101
192.168.10.101:8080/lab

就能启动远程JupyterLab了,首次登录需要输入上面设置的密码: 在这里插入图片描述

后记

下篇给Jetson Nano装一系列与机械臂相关的驱动。

关注
打赏
1658390299
查看更多评论
立即登录/注册

微信扫码登录

0.2290s