当前位置:网站首页>Jupyter remote server configuration and server startup
Jupyter remote server configuration and server startup
2022-07-03 08:19:00 【qq_ forty-three million thirty-one thousand two hundred and thi】
One 、anaconda install
1、 download anaconda Installation package
[ Tsinghua mirror network ](https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/)`
2、 Command to install
bash Anaconda3-5.2.0-Linux-x86_64.sh
pip install jupyterlab
Two 、 To configure jupyter
1、 Generate configuration files
a. jupyter --paths
see .jupyter Is there any jupyter_notebook_config.py,
without ,shell function
jupyter notebook --generate-config( Generate jupyter_notebook_config.py, After the command is executed, the corresponding file path will be displayed )
b. vim jupyter_notebook_config.py( Modify the configuration )
2、 Configuration file modification
2.1 password Generate
# ipython Enter code line , Enter the following two lines of code and the corresponding password to generate the secret
(dev37) [email protected]-192-168-0-35 project % ipython
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:59:23)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.33.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from notebook.auth import passwd
...: passwd()
Enter password:
Verify password:
Out[1]: 'argon2:$argon2id$v=19$m=10240,t=10,p=8$RPFTJPYMgIgpj9OaLZQ9Dg$81axqbnxoIBCwgxy2SGqdPp7nBM+0ab16oBJkp1bA/A'
2.2 jupyter_notebook_config.py Relevant contents modified in
# Nginx Cross domain access will occur when accessing , It needs to be allowed here
c.NotebookApp.allow_origin = '*'
# It is forbidden to change the password at will
c.NotebookApp.allow_password_change = False
# Whether remote access is allowed
c.NotebookApp.allow_remote_access = True
# IP
c.NotebookApp.ip = '0.0.0.0'
# port
c.NotebookApp.port = 9820
# working directory
c.NotebookApp.notebook_dir = '/jupyter/'
# start-up Jupyter Notebook Whether to open the browser later
c.NotebookApp.open_browser = False
# Client open Jupyter Notebook Password hash value for
c.NotebookApp.password = 'sha1:7e9d8d4722c3:aa0a16fcf06b44ecbf208a3172af65f4d57163da'
3、 start-up
# Specify the profile path : /home/ubuntu/.jupyter/jupyter_lab_config.py: Change to your own configuration file path
nohup jupyter-lab --config /home/ubuntu/.jupyter/jupyter_lab_config.py --allow-root>/mnt/sdma/jupyter/develop37.txt>/mnt/sdma/jupyter/develop37_jupyter.txt 2>&1 &
3、 ... and 、 Configure power on self start
1、 Write self startup script
#!/bin/bash
nohup /home/ubuntu/anaconda3/envs/develop37/bin/jupyter-lab --config /home/ubuntu/.jupyter/jupyter_lab_config.py --allow-root>/mnt/sdma/jupyter/develop37.txt>/mnt/sdma/jupyter/develop37_jupyter.txt 2>&1 &
2、 Develop self starting Services ( The path of self starting service : linux The server is usually this path :/etc/systemd/system/)
[Unit]
Description=jupyter-lab
After=network.target
[Service]
ExecStart=/opt/jupyter.sh
[Install]
WantedBy=multi-user.target
( 3、 ... and .1 The self starting script in has been added #!/bin/bash, all ExecStart Direct file full path to start )
2.1 Self starting service content explanation :
[Unit]: Description of the service
Description: Describe the service
After: Describe the service category
[Service] Setting of service running parameters
Type=forking It's in the form of background operation
ExecStart Run the command for the service
ExecReload Restart command for service
ExecStop Stop command for service
PrivateTmp=True Indicates that a service is assigned a separate temporary space
Be careful : start-up 、 restart 、 All stop commands require absolute paths
3、 Start and view status
systemctl enable rc-local
systemctl start rc-local.service # Start the service
systemctl stop rc-local.service # Temporarily Out of Service
systemctl status rc-local.service # Check the status
systemctl daemon-reload # Reload the self starting service
If the implementation is successful, it will be shown as follows
4、 If the state is not success, It means that the self starting service has bug, The approximate rate is ExecStart There is a problem with the startup command
边栏推荐
- Unity change default editor
- 使用 FileChannel 进行文件的复制拷贝
- Wechat applet taro learning record
- Basic operation and process control 2
- Golang time format sorting
- P2622 light off problem II (state compression search)
- Huawei interview summary during the epidemic
- Retail philosophy retail psychological warfare after reading -- 7-11 is a good product!
- Shader foundation 01
- 数据的存储
猜你喜欢
Image processing 8-cnn image classification
Use of ue5 QRcode plug-in
數據庫應用技術課程設計之商城管理系統
数据分析练习题
C语言-入门-精华版-带你走进编程(一)
Transfinite hacker cognition
CLion-Toolchains are not configured Configure Disable profile问题解决
Xlua task list youyou
Basic operation and process control
[cocos creator] Click the button to switch the interface
随机推荐
MAE
What is BFC?
使用base64编码传图片
Clion toolchains are not configured configure disable profile problem solving
Go resolve ID card
Generate video using clipout in viz engine
UE4 call DLL
CLion-Toolchains are not configured Configure Disable profile问题解决
2021-10-19
Unity change default editor
十六进制编码简介
【云原生】微服务之Feign的介绍与使用
P2622 关灯问题II(状态压缩 搜索)
Ue5 opencv plug-in use
Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does
Editor Extensions
Osgearth north arrow display
About Wireshark's unsuccessful installation of npcap
tslib库的移植
My touch screen production "brief history" 2