当前位置:网站首页>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
边栏推荐
- Golang 中string和int类型相互转换
- Encoding and decoding of golang URL
- the installer has encountered an unexpected error installing this package
- Some understandings of 3dfiles
- P1896 [scoi2005] non aggression (shape pressure DP)
- Mall management system of database application technology course design
- KunlunBase MeetUP 等您来!
- Product creation and commercial realization of chat robot (according to La Ma Bang - Dr. Wang Jingjing - speech)
- Lua framwrok framework starts
- Mutual call between Lua and C #
猜你喜欢

Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products

Unity performance optimization

Transplantation of freetype Library

the installer has encountered an unexpected error installing this package

A tunnel to all ports of the server

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

IP production stream is so close to me
![[global product discovery 2] the first pure cloud augmented reality (AR) platform - Israel](/img/51/04f5a9dbd03438fbdf25545a81b7ba.jpg)
[global product discovery 2] the first pure cloud augmented reality (AR) platform - Israel

Abstract classes and interfaces

L'installateur a été installé avec une erreur inattendue
随机推荐
MaxCompute字符串分割函数-SPLIT_PART
Free use until 2015 -- viz artist multi touch plug-in package
Conversion between string and int types in golang
Student educational administration management system of C # curriculum design
swagger文档配置
Use filechannel to copy files
简易入手《SOM神经网络》的本质与原理
P1896 [SCOI2005] 互不侵犯(状压dp)
Solution détaillée de toutes les formules de fonction de transfert (fonction d'activation) du réseau neuronal MATLAB
WPF:解决MaterialDesign:DialogHost 无法关闭问题
Haproxy+kept build 01
Easy touch plug-in
使用 FileChannel 进行文件的复制拷贝
Wechat native applet cloud development learning record 01
tslib库的移植
animation
Ue5 opencv plug-in use
oracle 插入单引号
Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“
Storage of data