密码 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为关键字