jupyterlab安装及简单配置

密码 lmklmk
启动jupyterlab
linux命令deploy命令

#linux命令
docker run -tdi -p 64888:8888  --name jlab1   --privileged=true registry.cn-hangzhou.aliyuncs.com/mkmk/python37:al1  init && docker exec -d jlab1 /bin/bash -c "cd /jupyterlab && nohup jlab &"

windows命令deploy命令

#windows命令
docker run -tdi  -p 54888:8888  --name jlab1   --privileged=true registry.cn-hangzhou.aliyuncs.com/mkmk/python37:al1  init | docker exec -d jlab1 /bin/bash -c "cd /jupyterlab && nohup jlab &"
#windows,静态ip命令
docker run -tdi  --network mynet10  --ip 10.10.10.11   --name jlab1   --privileged=true registry.cn-hangzhou.aliyuncs.com/mkmk/python37:al1  init | docker exec -d jlab1 /bin/bash -c "cd /jupyterlab && nohup jlab &"
#进入jupyterlab
http://10.10.10.10:8888/labt
#进入jupyter 基础版
http://localhost:8888/tree

以下是容器的配置过程

 pip install jupyterlab
 
 #查找python3的环境变量的路径
 whereis python3
 [root@5a483a472d30 bin]# whereis python3
python3: /usr/bin/python3 /usr/local/python3

#查看其中的文件
cd /usr/local/python3/bin
ls
2to3     ipython3      jupyter-lab
#建立软连接
ln -s /usr/local/python3/bin/jupyter-lab /usr/bin/jlab

或者直接把环境变量全部添加

vi /etc/profile
在文件中加入
#export LANG=zh_CN.UTF-8
export PATH=$PATH:/usr/local/python3/bin

source  /etc/profile

启动jupyterlab

#linux配置npm环境
wget https://nodejs.org/dist/v8.11.4/node-v8.11.4-linux-x64.tar.xz
tar xvf node-v8.11.4-linux-x64.tar.xz
mv node-v8.11.4-linux-x64 node-v8
export PATH=$PATH:/node-v8/bin
source /etc/profile
/node-v8/bin
# 安装一个生成目录的插件
jupyter labextension install @jupyterlab/toc
# 可以查看一下安装的插件
jupyter labextension list

jupyter labextension install @jupyterlab/go_to_definition

配置部分借鉴
https://www.cnblogs.com/lskreno/p/10844315.html

centos7源码安装编译python37

yum  update 

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make

mkdir home

cd home 
wget   https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz

 tar -xvf Python-3.7.6.tgz 

 cd Python-3.7.6

./configure --prefix=/usr/local/python37
make && make install

ln -s /usr/local/python37  /usr/bin/python37 

vi /etc/profile

export PATH=$PATH:/usr/local/python37/bin
:wq
source /etc/profile 

#清除yum缓存
yum clean packages && yum clean headers  && yum clean oldheaders

备份文件系统

nohup tar cvpzf /backup20200123.tgz --exclude=/proc --exclude=/nohup.out  --exclude=/backup20200123.tgz --exclude=/mnt --exclude=/sys/  --exclude=/run  / &

docker批量删除容器、镜像
1、删除所有容器
docker rm `docker ps -a -q`
2、删除所有镜像
docker rmi `docker images -q`
3、按条件删除镜像
  没有打标签

docker rmi `docker images -q | awk '/^<none>/ { print $3 }'`

镜像名包含关键字

docker rmi --force `docker images | grep doss-api | awk '{print $3}'`    //其中doss-api为关键字
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是一个简单的示例,演示如何使用 Vue 开发一个 JupyterLab 插件: 1. 创建一个新的 Vue 项目: ```shell vue create my-jupyterlab-plugin ``` 2. 安装 JupyterLab 插件开发工具包: ```shell npm install --save-dev @jupyterlab/plugin-cli ``` 3. 创建 JupyterLab 插件: ```shell jupyter labextension create --name=my-jupyterlab-plugin --output-dir=. ``` 4. 配置插件: 在项目根目录下创建一个 `package.json` 文件,并在其中添加以下内容: ```json { "name": "my-jupyterlab-plugin", "version": "0.1.0", "description": "My JupyterLab Plugin", "main": "lib/index.js", "jupyter": { "labextension": true, "mimeExtension": true, "output": { "renderer": false, "source": false } } } ``` 5. 编写插件代码: 在插件项目的 `src` 目录下创建一个 `HelloWorld.vue` 组件,并在其中添加以下内容: ```html <template> <div> <h1>Hello, JupyterLab!</h1> </div> </template> <script> export default { name: 'HelloWorld' } </script> <style scoped> h1 { color: red; } </style> ``` 在插件项目的 `src/index.js` 文件中,使用 Vue 创建一个新的插件,并将 `HelloWorld` 组件作为插件的入口: ```javascript import Vue from 'vue' import HelloWorld from './HelloWorld.vue' const MyJupyterLabPlugin = { id: 'my-jupyterlab-plugin', autoStart: true, activate: (app) => { const content = new Vue({ render: h => h(HelloWorld) }) app.shell.add(content, 'main') } } export default MyJupyterLabPlugin ``` 6. 构建插件: ```shell jupyter labextension build . ``` 7. 安装插件: ```shell jupyter labextension install . ``` 8. 运行 JupyterLab: ```shell jupyter lab ``` 在 JupyterLab 中,你应该能够看到一个显示 "Hello, JupyterLab!" 的红色标题。这个示例只是一个简单的入门示例,实际的插件开发可能需要更多的复杂性和功能。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yuemake999

请我喝茶呗

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值