從配置環境起,讓咱們一起入坑AI吧~
Let’s Go~~~
查看當前系統內核版本
uname -a
[root@iZuf630bctfwzkfl2xfxa7Z doc]# uname -a
Linux iZuf630bctfwzkfl2xfxa7Z 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
查看當前作業系統
cat /etc/centos-release
[root@iZuf630bctfwzkfl2xfxa7Z ~]# cat /etc/centos-release
CentOS Linux release 8.4.2105
安裝apt-get
[root@iZuf630bctfwzkfl2xfxa7Z ~]# cat /etc/centos-release
CentOS Linux release 8.4.2105
[root@iZuf630bctfwzkfl2xfxa7Z ~]# curl https://raw.githubusercontent.com/dvershinin/apt-get-centos/master/apt-get.sh -o /usr/local/bin/apt-get
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1256 100 1256 0 0 2914 0 --:--:-- --:--:-- --:--:-- 2920
[root@iZuf630bctfwzkfl2xfxa7Z ~]#
Welcome to Alibaba Cloud Elastic Compute Service !
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Sun Sep 5 20:34:16 2021 from 112.65.13.67
設定權限
[root@iZuf630bctfwzkfl2xfxa7Z ~]# chmod 0755 /usr/local/bin/apt-get
安裝Pip3
[root@iZuf630bctfwzkfl2xfxa7Z ~]# yum install python3-pip
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:49:27 ago on Sun 05 Sep 2021 09:06:07 PM CST.
Package python3-pip-9.0.3-19.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
安裝jupyter
[root@iZuf630bctfwzkfl2xfxa7Z ~]# pip3 install jupyter
生成Jupyter組態檔
#root客戶:
jupyter notebook --generate-config --allow-root
#非root客戶
jupyter notebook --generate-config
[root@iZuf630bctfwzkfl2xfxa7Z ~]# jupyter notebook --generate-config --allow-root
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
打開Ipython,生成密碼
[root@iZuf630bctfwzkfl2xfxa7Z ~]# ipython
Python 3.6.8 (default, Mar 19 2021, 05:13:41)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [2]: from notebook.auth import passwd
In [3]: passwd()
會讓輸入兩次密碼,輸入完成后 復制生成的 秘鑰,后面會用到,秘鑰帶上sha1
修改組態檔,root用戶默認在root目錄
[root@iZuf630bctfwzkfl2xfxa7Z ~]# vi /root/.jupyter/jupyter_notebook_config.py
##change as follows:
c.NotebookApp.ip = 'xx.xxx.xx.xxx' 對外提供訪問的ip,云服務外網ip
c.NotebookApp.port = 8123 對外提供訪問的埠
c.NotebookApp.open_browser = False False啟動不打開瀏覽器
c.NotebookApp.password = u'sha1:XXXXX' 上面生成的秘鑰
c.NotebookApp.notebook_dir = u'/opt/jupyter_dir' 設定jupyter啟動后默認根目錄
啟動jupyter
root用戶,后臺啟動
[root@iZuf630bctfwzkfl2xfxa7Z ~]# nohup jupyter notebook --allow-root&
[1] 2667437
[root@iZuf630bctfwzkfl2xfxa7Z ~]# nohup: ignoring input and appending output to 'nohup.out'
非root
[root@iZuf630bctfwzkfl2xfxa7Z ~]# jupyter notebook --allow-root&
本地訪問
https://blog.csdn.net/z136435458/article/details/92853982
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/297945.html
標籤:其他
上一篇:Spring整合筆記
下一篇:【Java 虛擬機原理】垃圾回收演算法 ( 設定 JVM 命令引數輸出 GC 日志 | GC 日志輸出示例 | GC 日志分析 )
