当前位置:网站首页>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
边栏推荐
- Clion toolchains are not configured configure disable profile problem solving
- MAE
- Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“
- Get to know unity2 for the first time
- Golang json格式和结构体相互转换
- Compilation error: "not in executable format: file format not recognized"“
- Solution détaillée de toutes les formules de fonction de transfert (fonction d'activation) du réseau neuronal MATLAB
- [cocos creator] get the resource UUID
- Abstract classes and interfaces
- A tunnel to all ports of the server
猜你喜欢

Redis data structure

KunlunBase MeetUP 等您来!

简易入手《SOM神经网络》的本质与原理

Easy touch plug-in

About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed

Multi traveling salesman problem -- overview of formula and solution process

matlab神经网络所有传递函数(激活函数)公式详解

C course design employee information management system

Abstract classes and interfaces

IP production stream is so close to me
随机推荐
Student educational administration management system of C # curriculum design
One dimensional array two dimensional array (sort Max insert sort)
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
Xlua task list youyou
Viz artist advanced script video tutorial -- stringmap use and vertex operation
P2622 light off problem II (state compression search)
The general trend of data news releases the power of visual reporting ----- essays after reading
Flex flexible box layout
Golang 时间格式整理
图像处理8-CNN图像分类
Maxcompute string splitting function -split_ PART
Initial unity
Oracle insert single quotation mark
Ue5 opencv plug-in use
Transplantation of freetype Library
String class
梯度下降法求解BP神经网络的简单Demo
matlab神经网络所有传递函数(激活函数)公式详解
Redis的数据结构
WPF:解决MaterialDesign:DialogHost 无法关闭问题