前言

PyTorch 的官网地址为:https://pytorch.org/

PyTorch Tutorials 的地址为:https://pytorch.org/tutorials/

操作系统:Ubuntu 18.04.6 LTS

参考文档

  1. PyTorch 官网

  2. PyTorch Tutorials

  3. GET STARTED

  4. Anaconda详细安装使用教程

  5. [400]anaconda详细安装使用教程

  6. jupyter notebook 默认路径修改

  7. 使用pip 安装jupyter notebook

  8. Running a notebook server

  9. LEARN THE BASICS

  10. PyTorch实战指南

安装 PyTorch

PyTorch 官方安装教程:https://pytorch.org/get-started/locally/

  1. 本地操作系统信息。
1
2
3
4
5
6
7
8
9
$ hostnamectl
Static hostname: amax
Icon name: computer-server
Chassis: server
Machine ID: 9e3f9b2c17f34ec498bbe99396f0597d
Boot ID: 045903c8f58741f1b1862515b085885b
Operating System: Ubuntu 18.04.6 LTS
Kernel: Linux 5.4.0-126-generic
Architecture: x86-64
  1. 本地 NVIDIA System Management Interface。其中 CUDA Version: 11.6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$ nvidia-smi
Sat Oct 8 14:45:37 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02 Driver Version: 510.85.02 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:02:00.0 Off | N/A |
| 29% 39C P8 9W / 250W | 0MiB / 11264MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 NVIDIA GeForce ... Off | 00000000:81:00.0 Off | N/A |
| 32% 45C P8 10W / 250W | 0MiB / 11264MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
  1. 安装 Anaconda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
$ curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ sh Miniconda3-latest-Linux-x86_64.sh

Welcome to Miniconda3 py39_4.12.0

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
======================================
End User License Agreement - Miniconda
======================================

Copyright 2015-2022, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

This End User License Agreement (the "Agreement") is a legal agreement between you and Anaconda, Inc. ("Anaconda") and governs your use of Miniconda.

Subject to the terms of this Agreement, Anaconda hereby grants you a non-exclusive, non-transferable license to:

* Install and use the Miniconda,
* Modify and create derivative works of sample source code delivered in Miniconda subject to the Terms of Service for the Repository (as defined hereinafter) availa
ble at https://www.anaconda.com/terms-of-service, and
* Redistribute code files in source (if provided to you by Anaconda as source) and binary forms, with or without modification subject to the requirements set forth
below.

Anaconda may, at its option, make available patches, workarounds or other updates to Miniconda. Unless the updates are provided with their separate governing terms, t
hey are deemed part of Miniconda licensed to you as provided in this Agreement. This Agreement does not entitle you to any support for Miniconda.

Anaconda reserves all rights not expressly granted to you in this Agreement.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other m
aterials provided with the distribution.
* Neither the name of Anaconda nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior writte
n permission.

You acknowledge that, as between you and Anaconda, Anaconda owns all right, title, and interest, including all intellectual property rights, in and to Miniconda and,
with respect to third-party products distributed with or through Miniconda, the applicable third-party licensors own all right, title and interest, including all inte
llectual property rights, in and to such products. If you send or transmit any communications or materials to Anaconda suggesting or recommending changes to the softw
are or documentation, including without limitation, new features or functionality relating thereto, or any comments, questions, suggestions or the like ("Feedback"),
Anaconda is free to use such Feedback. You hereby assign to Anaconda all right, title, and interest in, and Anaconda is free to use, without any attribution or compen
sation to any party, any ideas, know-how, concepts, techniques or other intellectual property rights contained in the Feedback, for any purpose whatsoever, although A
naconda is not required to use any Feedback.

DISCLAIMER
==========

THIS SOFTWARE IS PROVIDED BY ANACONDA AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER
CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CO
NSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUS
ED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWA
RE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

TO THE MAXIMUM EXTENT PERMITTED BY LAW, ANACONDA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PR
OFITS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT OR THE USE OR
PERFORMANCE OF MINICONDA, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABIL
ITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY. IN NO EVENT WILL THE TOTAL CUMULATIVE LIABILITY OF ANACONDA AND ITS AFFILIATES UNDER OR ARISING OUT OF THIS A
GREEMENT EXCEED US.00.

Miscellaneous
=============

If you want to terminate this Agreement, you may do so by discontinuing use of Miniconda. Anaconda may, at any time, terminate this Agreement and the license granted
hereunder if you fail to comply with any term of this Agreement. Upon any termination of this Agreement, you agree to promptly discontinue use of the Miniconda and de
stroy all copies in your possession or control. Upon any termination of this Agreement all provisions survive except for the licenses granted to you.

This Agreement is governed by and construed in accordance with the internal laws of the State of Texas without giving effect to any choice or conflict of law provisio
n or rule that would require or permit the application of the laws of any jurisdiction other than those of the State of Texas. Any legal suit, action, or proceeding a
rising out of or related to this Agreement or the licenses granted hereunder by you must be instituted exclusively in the federal courts of the United States or the c
ourts of the State of Texas in each case located in Travis County, Texas, and you irrevocably submit to the jurisdiction of such courts in any such suit, action, or p
roceeding.

Notice of Third Party Software Licenses
=======================================

Miniconda provides access to a repository (the "Repository") which contains software packages or tools licensed on an open source basis from third parties and binary
packages of these third party tools. These third party software packages or tools are provided on an "as is" basis and are subject to their respective license agreeme
nts as well as this Agreement and the Terms of Service for the Repository located at https://www.anaconda.com/terms-of-service; provided, however, no restriction cont
ained in the Terms of Service shall be construed so as to limit Your ability to download the packages contained in Miniconda provided you comply with the license for
each such package. These licenses may be accessed from within the Miniconda software[1] or https://www.anaconda.com/legal. Information regarding which license is appl
icable is available from within many of the third party software packages and tools and at https://repo.anaconda.com/pkgs/main/ and https://repo.anaconda.com/pkgs/r/.
Anaconda reserves the right, in its sole discretion, to change which third party tools are included in the Repository accessible through Miniconda.


Intel Math Kernel Library
-------------------------

Miniconda provides access to re-distributable, run-time, shared-library files from the Intel Math Kernel Library ("MKL binaries").

Copyright 2018 Intel Corporation. License available at https://software.intel.com/en-us/license/intel-simplified-software-license (the "MKL License").

You may use and redistribute the MKL binaries, without modification, provided the following conditions are met:

* Redistributions must reproduce the above copyright notice and the following terms of use in the MKL binaries and in the documentation and/or other materials provi
ded with the distribution.
* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from the MKL binaries without specific prior written p
ermission.
* No reverse engineering, decompilation, or disassembly of the MKL binaries is permitted.

You are specifically authorized to use and redistribute the MKL binaries with your installation of Miniconda subject to the terms set forth in the MKL License. You ar
e also authorized to redistribute the MKL binaries with Miniconda or in the Anaconda package that contains the MKL binaries. If needed, instructions for removing the
MKL binaries after installation of Miniconda are available at https://docs.anaconda.com.

cuDNN Software
--------------

Miniconda also provides access to cuDNN software binaries ("cuDNN binaries") from NVIDIA Corporation. You are specifically authorized to use the cuDNN binaries with y
our installation of Miniconda subject to your compliance with the license agreement located at https://docs.nvidia.com/deeplearning/sdk/cudnn-sla/index.html. You are
also authorized to redistribute the cuDNN binaries with an Miniconda package that contains the cuDNN binaries. You can add or remove the cuDNN binaries utilizing the
install and uninstall features in Miniconda.

cuDNN binaries contain source code provided by NVIDIA Corporation.

Arm Performance Libraries
-------------------------

Arm Performance Libraries (Free Version): Anaconda provides access to software and related documentation from the Arm Performance Libraries ("Arm PL") provided by Arm
Limited. By installing or otherwise accessing the Arm PL, you acknowledge and agree that use and distribution of the Arm PL is subject to your compliance with the Ar
m PL end user license agreement located at: https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries/eula.

Export; Cryptography Notice
===========================

You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and
end use. Miniconda includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export
to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, po
ssession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wassenaar.org/ for more information.

Anaconda has self-classified this software as Export Commodity Control Number (ECCN) EAR99, which includes mass market information security software using or performi
ng cryptographic functions with asymmetric algorithms. No license is required for export of this software to non-embargoed countries.

The Intel Math Kernel Library contained in Miniconda is classified by Intel as ECCN 5D992.c with no license required for export to non-embargoed countries.

The following packages listed on https://www.anaconda.com/cryptography are included in the Repository accessible through Miniconda that relate to cryptography.

Last updated March 21, 2022

Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'
>>> yes

Miniconda3 will now be installed into this location:
/home/luyanfeng/miniconda3

- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below

[/home/luyanfeng/miniconda3] >>>
PREFIX=/home/luyanfeng/miniconda3
Unpacking payload ...
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

environment location: /home/luyanfeng/miniconda3

added / updated specs:
- _libgcc_mutex==0.1=main
- _openmp_mutex==4.5=1_gnu
- brotlipy==0.7.0=py39h27cfd23_1003
- ca-certificates==2022.3.29=h06a4308_1
- certifi==2021.10.8=py39h06a4308_2
- cffi==1.15.0=py39hd667e15_1
- charset-normalizer==2.0.4=pyhd3eb1b0_0
- colorama==0.4.4=pyhd3eb1b0_0
- conda-content-trust==0.1.1=pyhd3eb1b0_0
- conda-package-handling==1.8.1=py39h7f8727e_0
- conda==4.12.0=py39h06a4308_0
- cryptography==36.0.0=py39h9ce1e76_0
- idna==3.3=pyhd3eb1b0_0
- ld_impl_linux-64==2.35.1=h7274673_9
- libffi==3.3=he6710b0_2
- libgcc-ng==9.3.0=h5101ec6_17
- libgomp==9.3.0=h5101ec6_17
- libstdcxx-ng==9.3.0=hd4cf53a_17
- ncurses==6.3=h7f8727e_2
- openssl==1.1.1n=h7f8727e_0
- pip==21.2.4=py39h06a4308_0
- pycosat==0.6.3=py39h27cfd23_0
- pycparser==2.21=pyhd3eb1b0_0
- pyopenssl==22.0.0=pyhd3eb1b0_0
- pysocks==1.7.1=py39h06a4308_0
- python==3.9.12=h12debd9_0
- readline==8.1.2=h7f8727e_1
- requests==2.27.1=pyhd3eb1b0_0
- ruamel_yaml==0.15.100=py39h27cfd23_0
- setuptools==61.2.0=py39h06a4308_0
- six==1.16.0=pyhd3eb1b0_1
- sqlite==3.38.2=hc218d9a_0
- tk==8.6.11=h1ccaba5_0
- tqdm==4.63.0=pyhd3eb1b0_0
- tzdata==2022a=hda174b7_0
- urllib3==1.26.8=pyhd3eb1b0_0
- wheel==0.37.1=pyhd3eb1b0_0
- xz==5.2.5=h7b6447c_0
- yaml==0.2.5=h7b6447c_0
- zlib==1.2.12=h7f8727e_1


The following NEW packages will be INSTALLED:

_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py39h27cfd23_1003
ca-certificates pkgs/main/linux-64::ca-certificates-2022.3.29-h06a4308_1
certifi pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
cffi pkgs/main/linux-64::cffi-1.15.0-py39hd667e15_1
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
colorama pkgs/main/noarch::colorama-0.4.4-pyhd3eb1b0_0
conda pkgs/main/linux-64::conda-4.12.0-py39h06a4308_0
conda-content-tru~ pkgs/main/noarch::conda-content-trust-0.1.1-pyhd3eb1b0_0
conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.8.1-py39h7f8727e_0
cryptography pkgs/main/linux-64::cryptography-36.0.0-py39h9ce1e76_0
idna pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
openssl pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
pip pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
pycosat pkgs/main/linux-64::pycosat-0.6.3-py39h27cfd23_0
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
pyopenssl pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
pysocks pkgs/main/linux-64::pysocks-1.7.1-py39h06a4308_0
python pkgs/main/linux-64::python-3.9.12-h12debd9_0
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
requests pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
ruamel_yaml pkgs/main/linux-64::ruamel_yaml-0.15.100-py39h27cfd23_0
setuptools pkgs/main/linux-64::setuptools-61.2.0-py39h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
sqlite pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
tk pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
tqdm pkgs/main/noarch::tqdm-4.63.0-pyhd3eb1b0_0
tzdata pkgs/main/noarch::tzdata-2022a-hda174b7_0
urllib3 pkgs/main/noarch::urllib3-1.26.8-pyhd3eb1b0_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_1


Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
no change /home/luyanfeng/miniconda3/condabin/conda
no change /home/luyanfeng/miniconda3/bin/conda
no change /home/luyanfeng/miniconda3/bin/conda-env
no change /home/luyanfeng/miniconda3/bin/activate
no change /home/luyanfeng/miniconda3/bin/deactivate
no change /home/luyanfeng/miniconda3/etc/profile.d/conda.sh
no change /home/luyanfeng/miniconda3/etc/fish/conf.d/conda.fish
no change /home/luyanfeng/miniconda3/shell/condabin/Conda.psm1
no change /home/luyanfeng/miniconda3/shell/condabin/conda-hook.ps1
no change /home/luyanfeng/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change /home/luyanfeng/miniconda3/etc/profile.d/conda.csh
modified /home/luyanfeng/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Miniconda3!
$ source ~/.bashrc
$ rm -rf Miniconda3-latest-Linux-x86_64.sh
  1. 安装 PyTorch 并验证。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
$ conda env list
# conda environments:
#
base * /home/luyanfeng/miniconda3

$ conda create -n pytorch-tutorials python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0

Please update conda by running

$ conda update -n base -c defaults conda



## Package Plan ##

environment location: /home/luyanfeng/miniconda3/envs/pytorch-tutorials

added / updated specs:
- python=3.8


The following packages will be downloaded:

package | build
---------------------------|-----------------
_openmp_mutex-5.1 | 1_gnu 21 KB
ca-certificates-2022.07.19 | h06a4308_0 124 KB
certifi-2022.9.24 | py38h06a4308_0 154 KB
ld_impl_linux-64-2.38 | h1181459_1 654 KB
libgcc-ng-11.2.0 | h1234567_1 5.3 MB
libgomp-11.2.0 | h1234567_1 474 KB
libstdcxx-ng-11.2.0 | h1234567_1 4.7 MB
ncurses-6.3 | h5eee18b_3 781 KB
openssl-1.1.1q | h7f8727e_0 2.5 MB
pip-22.2.2 | py38h06a4308_0 2.3 MB
python-3.8.13 | h12debd9_0 18.8 MB
setuptools-63.4.1 | py38h06a4308_0 1.1 MB
sqlite-3.39.3 | h5082296_0 1.1 MB
tk-8.6.12 | h1ccaba5_0 3.0 MB
xz-5.2.6 | h5eee18b_0 394 KB
zlib-1.2.12 | h5eee18b_3 103 KB
------------------------------------------------------------
Total: 41.5 MB

The following NEW packages will be INSTALLED:

_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
ca-certificates pkgs/main/linux-64::ca-certificates-2022.07.19-h06a4308_0
certifi pkgs/main/linux-64::certifi-2022.9.24-py38h06a4308_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1
libgomp pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1
ncurses pkgs/main/linux-64::ncurses-6.3-h5eee18b_3
openssl pkgs/main/linux-64::openssl-1.1.1q-h7f8727e_0
pip pkgs/main/linux-64::pip-22.2.2-py38h06a4308_0
python pkgs/main/linux-64::python-3.8.13-h12debd9_0
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
setuptools pkgs/main/linux-64::setuptools-63.4.1-py38h06a4308_0
sqlite pkgs/main/linux-64::sqlite-3.39.3-h5082296_0
tk pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.6-h5eee18b_0
zlib pkgs/main/linux-64::zlib-1.2.12-h5eee18b_3


Proceed ([y]/n)? y


Downloading and Extracting Packages
ld_impl_linux-64-2.3 | 654 KB | ################################# | 100%
pip-22.2.2 | 2.3 MB | ################################# | 100%
certifi-2022.9.24 | 154 KB | ################################# | 100%
libgomp-11.2.0 | 474 KB | ################################# | 100%
xz-5.2.6 | 394 KB | ################################# | 100%
openssl-1.1.1q | 2.5 MB | ################################# | 100%
zlib-1.2.12 | 103 KB | ################################# | 100%
ncurses-6.3 | 781 KB | ################################# | 100%
sqlite-3.39.3 | 1.1 MB | ################################# | 100%
libstdcxx-ng-11.2.0 | 4.7 MB | ################################# | 100%
tk-8.6.12 | 3.0 MB | ################################# | 100%
libgcc-ng-11.2.0 | 5.3 MB | ################################# | 100%
ca-certificates-2022 | 124 KB | ################################# | 100%
setuptools-63.4.1 | 1.1 MB | ################################# | 100%
_openmp_mutex-5.1 | 21 KB | ################################# | 100%
python-3.8.13 | 18.8 MB | ################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate pytorch-tutorials
#
# To deactivate an active environment, use
#
# $ conda deactivate

$ conda env list
# conda environments:
#
base * /home/luyanfeng/miniconda3
pytorch-tutorials /home/luyanfeng/miniconda3/envs/pytorch-tutorials

$ conda activate pytorch-tutorials
$ pip list
Package Version
---------- ---------
certifi 2022.9.24
pip 22.2.2
setuptools 63.4.1
wheel 0.37.1
$ conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0

Please update conda by running

$ conda update -n base -c defaults conda



## Package Plan ##

environment location: /home/luyanfeng/miniconda3/envs/pytorch-tutorials

added / updated specs:
- cudatoolkit=11.6
- pytorch
- torchaudio
- torchvision


The following packages will be downloaded:

package | build
---------------------------|-----------------
blas-1.0 | mkl 6 KB
brotlipy-0.7.0 |py38h0a891b7_1004 342 KB conda-forge
bzip2-1.0.8 | h7f98852_4 484 KB conda-forge
ca-certificates-2022.9.24 | ha878542_0 150 KB conda-forge
certifi-2022.9.24 | pyhd8ed1ab_0 155 KB conda-forge
cffi-1.14.6 | py38ha65f79e_0 226 KB conda-forge
charset-normalizer-2.1.1 | pyhd8ed1ab_0 36 KB conda-forge
cryptography-37.0.2 | py38h2b5fc30_0 1.5 MB conda-forge
cudatoolkit-11.6.0 | hecad31d_10 821.2 MB conda-forge
ffmpeg-4.3 | hf484d3e_0 9.9 MB pytorch
freetype-2.10.4 | h0708190_1 890 KB conda-forge
gmp-6.2.1 | h58526e2_0 806 KB conda-forge
gnutls-3.6.13 | h85f3911_1 2.0 MB conda-forge
idna-3.4 | pyhd8ed1ab_0 55 KB conda-forge
intel-openmp-2021.4.0 | h06a4308_3561 4.2 MB
jpeg-9e | h166bdaf_1 268 KB conda-forge
lame-3.100 | h7f98852_1001 496 KB conda-forge
lcms2-2.12 | hddcbb42_0 443 KB conda-forge
libiconv-1.17 | h166bdaf_0 1.4 MB conda-forge
libpng-1.6.37 | h21135ba_2 306 KB conda-forge
libtiff-4.2.0 | hf544144_3 590 KB conda-forge
libwebp-base-1.2.2 | h7f98852_1 824 KB conda-forge
lz4-c-1.9.3 | h9c3ff4c_1 179 KB conda-forge
mkl-2021.4.0 | h06a4308_640 142.6 MB
mkl-service-2.4.0 | py38h95df7f1_0 61 KB conda-forge
mkl_fft-1.3.1 | py38h8666266_1 213 KB conda-forge
mkl_random-1.2.2 | py38h1abd341_0 364 KB conda-forge
nettle-3.6 | he412f7d_0 6.5 MB conda-forge
numpy-1.23.1 | py38h6c91a56_0 11 KB
numpy-base-1.23.1 | py38ha15fc14_0 5.6 MB
olefile-0.46 | pyh9f0ad1d_1 32 KB conda-forge
openh264-2.1.1 | h780b84a_0 1.5 MB conda-forge
openjpeg-2.4.0 | hb52868f_1 444 KB conda-forge
openssl-1.1.1o | h166bdaf_0 2.1 MB conda-forge
pillow-8.2.0 | py38ha0e1e83_1 688 KB conda-forge
pycparser-2.21 | pyhd8ed1ab_0 100 KB conda-forge
pyopenssl-22.0.0 | pyhd8ed1ab_1 120 KB conda-forge
pysocks-1.7.1 | pyha2e5f31_6 19 KB conda-forge
python_abi-3.8 | 2_cp38 4 KB conda-forge
pytorch-1.12.1 |py3.8_cuda11.6_cudnn8.3.2_0 1.20 GB pytorch
pytorch-mutex-1.0 | cuda 3 KB pytorch
requests-2.28.1 | pyhd8ed1ab_1 53 KB conda-forge
six-1.16.0 | pyh6c4a22f_0 14 KB conda-forge
torchaudio-0.12.1 | py38_cu116 6.2 MB pytorch
torchvision-0.13.1 | py38_cu116 7.7 MB pytorch
typing_extensions-4.4.0 | pyha770c72_0 29 KB conda-forge
urllib3-1.26.11 | pyhd8ed1ab_0 102 KB conda-forge
zstd-1.5.0 | ha95c52a_0 490 KB conda-forge
------------------------------------------------------------
Total: 2.20 GB

The following NEW packages will be INSTALLED:

blas pkgs/main/linux-64::blas-1.0-mkl
brotlipy conda-forge/linux-64::brotlipy-0.7.0-py38h0a891b7_1004
bzip2 conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
cffi conda-forge/linux-64::cffi-1.14.6-py38ha65f79e_0
charset-normalizer conda-forge/noarch::charset-normalizer-2.1.1-pyhd8ed1ab_0
cryptography conda-forge/linux-64::cryptography-37.0.2-py38h2b5fc30_0
cudatoolkit conda-forge/linux-64::cudatoolkit-11.6.0-hecad31d_10
ffmpeg pytorch/linux-64::ffmpeg-4.3-hf484d3e_0
freetype conda-forge/linux-64::freetype-2.10.4-h0708190_1
gmp conda-forge/linux-64::gmp-6.2.1-h58526e2_0
gnutls conda-forge/linux-64::gnutls-3.6.13-h85f3911_1
idna conda-forge/noarch::idna-3.4-pyhd8ed1ab_0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
jpeg conda-forge/linux-64::jpeg-9e-h166bdaf_1
lame conda-forge/linux-64::lame-3.100-h7f98852_1001
lcms2 conda-forge/linux-64::lcms2-2.12-hddcbb42_0
libiconv conda-forge/linux-64::libiconv-1.17-h166bdaf_0
libpng conda-forge/linux-64::libpng-1.6.37-h21135ba_2
libtiff conda-forge/linux-64::libtiff-4.2.0-hf544144_3
libwebp-base conda-forge/linux-64::libwebp-base-1.2.2-h7f98852_1
lz4-c conda-forge/linux-64::lz4-c-1.9.3-h9c3ff4c_1
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
mkl-service conda-forge/linux-64::mkl-service-2.4.0-py38h95df7f1_0
mkl_fft conda-forge/linux-64::mkl_fft-1.3.1-py38h8666266_1
mkl_random conda-forge/linux-64::mkl_random-1.2.2-py38h1abd341_0
nettle conda-forge/linux-64::nettle-3.6-he412f7d_0
numpy pkgs/main/linux-64::numpy-1.23.1-py38h6c91a56_0
numpy-base pkgs/main/linux-64::numpy-base-1.23.1-py38ha15fc14_0
olefile conda-forge/noarch::olefile-0.46-pyh9f0ad1d_1
openh264 conda-forge/linux-64::openh264-2.1.1-h780b84a_0
openjpeg conda-forge/linux-64::openjpeg-2.4.0-hb52868f_1
pillow conda-forge/linux-64::pillow-8.2.0-py38ha0e1e83_1
pycparser conda-forge/noarch::pycparser-2.21-pyhd8ed1ab_0
pyopenssl conda-forge/noarch::pyopenssl-22.0.0-pyhd8ed1ab_1
pysocks conda-forge/noarch::pysocks-1.7.1-pyha2e5f31_6
python_abi conda-forge/linux-64::python_abi-3.8-2_cp38
pytorch pytorch/linux-64::pytorch-1.12.1-py3.8_cuda11.6_cudnn8.3.2_0
pytorch-mutex pytorch/noarch::pytorch-mutex-1.0-cuda
requests conda-forge/noarch::requests-2.28.1-pyhd8ed1ab_1
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
torchaudio pytorch/linux-64::torchaudio-0.12.1-py38_cu116
torchvision pytorch/linux-64::torchvision-0.13.1-py38_cu116
typing_extensions conda-forge/noarch::typing_extensions-4.4.0-pyha770c72_0
urllib3 conda-forge/noarch::urllib3-1.26.11-pyhd8ed1ab_0
zstd conda-forge/linux-64::zstd-1.5.0-ha95c52a_0

The following packages will be UPDATED:

ca-certificates pkgs/main::ca-certificates-2022.07.19~ --> conda-forge::ca-certificates-2022.9.24-ha878542_0

The following packages will be SUPERSEDED by a higher-priority channel:

certifi pkgs/main/linux-64::certifi-2022.9.24~ --> conda-forge/noarch::certifi-2022.9.24-pyhd8ed1ab_0
openssl pkgs/main::openssl-1.1.1q-h7f8727e_0 --> conda-forge::openssl-1.1.1o-h166bdaf_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
numpy-base-1.23.1 | 5.6 MB | ########################################################################################################################### | 100%
pillow-8.2.0 | 688 KB | ########################################################################################################################### | 100%
urllib3-1.26.11 | 102 KB | ########################################################################################################################### | 100%
lz4-c-1.9.3 | 179 KB | ########################################################################################################################### | 100%
pytorch-1.12.1 | 1.20 GB | ########################################################################################################################### | 100%
openh264-2.1.1 | 1.5 MB | ########################################################################################################################### | 100%
numpy-1.23.1 | 11 KB | ########################################################################################################################### | 100%
gnutls-3.6.13 | 2.0 MB | ########################################################################################################################### | 100%
freetype-2.10.4 | 890 KB | ########################################################################################################################### | 100%
pyopenssl-22.0.0 | 120 KB | ########################################################################################################################### | 100%
requests-2.28.1 | 53 KB | ########################################################################################################################### | 100%
nettle-3.6 | 6.5 MB | ########################################################################################################################### | 100%
ca-certificates-2022 | 150 KB | ########################################################################################################################### | 100%
torchvision-0.13.1 | 7.7 MB | ########################################################################################################################### | 100%
charset-normalizer-2 | 36 KB | ########################################################################################################################### | 100%
bzip2-1.0.8 | 484 KB | ########################################################################################################################### | 100%
certifi-2022.9.24 | 155 KB | ########################################################################################################################### | 100%
intel-openmp-2021.4. | 4.2 MB | ########################################################################################################################### | 100%
blas-1.0 | 6 KB | ########################################################################################################################### | 100%
mkl-2021.4.0 | 142.6 MB | ########################################################################################################################### | 100%
ffmpeg-4.3 | 9.9 MB | ########################################################################################################################### | 100%
cffi-1.14.6 | 226 KB | ########################################################################################################################### | 100%
brotlipy-0.7.0 | 342 KB | ########################################################################################################################### | 100%
pysocks-1.7.1 | 19 KB | ########################################################################################################################### | 100%
libiconv-1.17 | 1.4 MB | ########################################################################################################################### | 100%
gmp-6.2.1 | 806 KB | ########################################################################################################################### | 100%
openjpeg-2.4.0 | 444 KB | ########################################################################################################################### | 100%
typing_extensions-4. | 29 KB | ########################################################################################################################### | 100%
libwebp-base-1.2.2 | 824 KB | ########################################################################################################################### | 100%
cryptography-37.0.2 | 1.5 MB | ########################################################################################################################### | 100%
torchaudio-0.12.1 | 6.2 MB | ########################################################################################################################### | 100%
libpng-1.6.37 | 306 KB | ########################################################################################################################### | 100%
mkl_random-1.2.2 | 364 KB | ########################################################################################################################### | 100%
python_abi-3.8 | 4 KB | ########################################################################################################################### | 100%
pycparser-2.21 | 100 KB | ########################################################################################################################### | 100%
mkl-service-2.4.0 | 61 KB | ########################################################################################################################### | 100%
lame-3.100 | 496 KB | ########################################################################################################################### | 100%
lcms2-2.12 | 443 KB | ########################################################################################################################### | 100%
six-1.16.0 | 14 KB | ########################################################################################################################### | 100%
zstd-1.5.0 | 490 KB | ########################################################################################################################### | 100%
pytorch-mutex-1.0 | 3 KB | ########################################################################################################################### | 100%
idna-3.4 | 55 KB | ########################################################################################################################### | 100%
olefile-0.46 | 32 KB | ########################################################################################################################### | 100%
mkl_fft-1.3.1 | 213 KB | ########################################################################################################################### | 100%
libtiff-4.2.0 | 590 KB | ########################################################################################################################### | 100%
jpeg-9e | 268 KB | ########################################################################################################################### | 100%
openssl-1.1.1o | 2.1 MB | ########################################################################################################################### | 100%
cudatoolkit-11.6.0 | 821.2 MB | ########################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: / By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html

done
$ pip list
Package Version
------------------ ---------
brotlipy 0.7.0
certifi 2022.9.24
cffi 1.14.6
charset-normalizer 2.1.1
cryptography 37.0.2
idna 3.4
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
numpy 1.23.1
olefile 0.46
Pillow 8.2.0
pip 22.2.2
pycparser 2.21
pyOpenSSL 22.0.0
PySocks 1.7.1
requests 2.28.1
setuptools 63.4.1
six 1.16.0
torch 1.12.1
torchaudio 0.12.1
torchvision 0.13.1
typing_extensions 4.4.0
urllib3 1.26.11
wheel 0.37.1
$ python --version
Python 3.8.13
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> x = torch.rand(5, 3)
>>> print(x)
tensor([[0.3916, 0.1399, 0.1719],
[0.7075, 0.6833, 0.8973],
[0.7452, 0.3193, 0.2473],
[0.6819, 0.8641, 0.6296],
[0.0478, 0.7371, 0.3067]])
>>> torch.cuda.is_available()
True
>>> exit()
$

安装 jupyter notebook

  1. 安装 jupyter notebook,并配置其密码工作目录
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
(base) luyanfeng@amax:~$ conda env list
# conda environments:
#
base * /home/luyanfeng/miniconda3
pytorch-tutorials /home/luyanfeng/miniconda3/envs/pytorch-tutorials

(base) luyanfeng@amax:~$ conda activate pytorch-tutorials
(pytorch-tutorials) luyanfeng@amax:~$ pip list
Package Version
------------------ ---------
brotlipy 0.7.0
certifi 2022.9.24
cffi 1.14.6
charset-normalizer 2.1.1
cryptography 37.0.2
idna 3.4
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
numpy 1.23.1
olefile 0.46
Pillow 8.2.0
pip 22.2.2
pycparser 2.21
pyOpenSSL 22.0.0
PySocks 1.7.1
requests 2.28.1
setuptools 63.4.1
six 1.16.0
torch 1.12.1
torchaudio 0.12.1
torchvision 0.13.1
typing_extensions 4.4.0
urllib3 1.26.11
wheel 0.37.1
(pytorch-tutorials) luyanfeng@amax:~$ pip install jupyter
Collecting jupyter
Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting nbconvert
Downloading nbconvert-7.2.1-py3-none-any.whl (271 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 271.6/271.6 kB 1.2 MB/s eta 0:00:00
Collecting ipykernel
Downloading ipykernel-6.16.0-py3-none-any.whl (138 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 138.4/138.4 kB 2.9 MB/s eta 0:00:00
Collecting jupyter-console
Downloading jupyter_console-6.4.4-py3-none-any.whl (22 kB)
Collecting qtconsole
Downloading qtconsole-5.3.2-py3-none-any.whl (120 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.8/120.8 kB 2.4 MB/s eta 0:00:00
Collecting ipywidgets
Downloading ipywidgets-8.0.2-py3-none-any.whl (134 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.4/134.4 kB 3.0 MB/s eta 0:00:00
Collecting notebook
Downloading notebook-6.4.12-py3-none-any.whl (9.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.9/9.9 MB 19.7 MB/s eta 0:00:00
Collecting jupyter-client>=6.1.12
Downloading jupyter_client-7.3.5-py3-none-any.whl (132 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.1/132.1 kB 3.3 MB/s eta 0:00:00
Collecting debugpy>=1.0
Downloading debugpy-1.6.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 24.5 MB/s eta 0:00:00
Collecting ipython>=7.23.1
Downloading ipython-8.5.0-py3-none-any.whl (752 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 752.0/752.0 kB 17.9 MB/s eta 0:00:00
Collecting pyzmq>=17
Downloading pyzmq-24.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 17.2 MB/s eta 0:00:00
Collecting packaging
Downloading packaging-21.3-py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 994.4 kB/s eta 0:00:00
Collecting tornado>=6.1
Downloading tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 424.0/424.0 kB 8.9 MB/s eta 0:00:00
Collecting traitlets>=5.1.0
Downloading traitlets-5.4.0-py3-none-any.whl (107 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.1/107.1 kB 2.6 MB/s eta 0:00:00
Collecting matplotlib-inline>=0.1
Downloading matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting psutil
Downloading psutil-5.9.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (284 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 284.8/284.8 kB 6.2 MB/s eta 0:00:00
Collecting nest-asyncio
Downloading nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting jupyterlab-widgets~=3.0
Downloading jupyterlab_widgets-3.0.3-py3-none-any.whl (384 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 384.1/384.1 kB 10.1 MB/s eta 0:00:00
Collecting widgetsnbextension~=4.0
Downloading widgetsnbextension-4.0.3-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 29.3 MB/s eta 0:00:00
Collecting pygments
Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 19.7 MB/s eta 0:00:00
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
Downloading prompt_toolkit-3.0.31-py3-none-any.whl (382 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 382.3/382.3 kB 9.8 MB/s eta 0:00:00
Collecting jupyterlab-pygments
Downloading jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting bleach
Downloading bleach-5.0.1-py3-none-any.whl (160 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.9/160.9 kB 4.1 MB/s eta 0:00:00
Collecting jupyter-core>=4.7
Downloading jupyter_core-4.11.1-py3-none-any.whl (88 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.4/88.4 kB 2.4 MB/s eta 0:00:00
Collecting beautifulsoup4
Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 kB 3.2 MB/s eta 0:00:00
Collecting nbformat>=5.1
Downloading nbformat-5.6.1-py3-none-any.whl (77 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.0/77.0 kB 1.8 MB/s eta 0:00:00
Collecting markupsafe>=2.0
Downloading MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting importlib-metadata>=3.6
Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Collecting pandocfilters>=1.4.1
Downloading pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting nbclient>=0.5.0
Downloading nbclient-0.7.0-py3-none-any.whl (71 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.9/71.9 kB 1.2 MB/s eta 0:00:00
Collecting jinja2>=3.0
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 3.8 MB/s eta 0:00:00
Collecting mistune<3,>=2.0.3
Downloading mistune-2.0.4-py2.py3-none-any.whl (24 kB)
Collecting tinycss2
Downloading tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting defusedxml
Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting prometheus-client
Downloading prometheus_client-0.14.1-py3-none-any.whl (59 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.5/59.5 kB 1.8 MB/s eta 0:00:00
Collecting argon2-cffi
Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting terminado>=0.8.3
Downloading terminado-0.16.0-py3-none-any.whl (16 kB)
Collecting Send2Trash>=1.8.0
Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting ipython-genutils
Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting qtpy>=2.0.1
Downloading QtPy-2.2.1-py3-none-any.whl (82 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.6/82.6 kB 2.4 MB/s eta 0:00:00
Collecting zipp>=0.5
Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB)
Collecting decorator
Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting backcall
Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting jedi>=0.16
Downloading jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 28.3 MB/s eta 0:00:00
Collecting stack-data
Downloading stack_data-0.5.1-py3-none-any.whl (24 kB)
Collecting pexpect>4.3
Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 1.8 MB/s eta 0:00:00
Collecting pickleshare
Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting entrypoints
Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting python-dateutil>=2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting fastjsonschema
Downloading fastjsonschema-2.16.2-py3-none-any.whl (22 kB)
Collecting jsonschema>=2.6
Downloading jsonschema-4.16.0-py3-none-any.whl (83 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.1/83.1 kB 2.6 MB/s eta 0:00:00
Collecting wcwidth
Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting ptyprocess
Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting argon2-cffi-bindings
Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 kB 1.7 MB/s eta 0:00:00
Collecting soupsieve>1.2
Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting webencodings
Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: six>=1.9.0 in ./miniconda3/envs/pytorch-tutorials/lib/python3.8/site-packages (from bleach->nbconvert->jupyter) (1.16.0)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting parso<0.9.0,>=0.8.0
Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.8/100.8 kB 602.3 kB/s eta 0:00:00
Collecting attrs>=17.4.0
Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 1.5 MB/s eta 0:00:00
Collecting importlib-resources>=1.4.0
Downloading importlib_resources-5.10.0-py3-none-any.whl (34 kB)
Collecting pkgutil-resolve-name>=1.3.10
Downloading pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Downloading pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.8/119.8 kB 2.9 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.0.1 in ./miniconda3/envs/pytorch-tutorials/lib/python3.8/site-packages (from argon2-cffi-bindings->argon2-cffi->notebook->jupyter) (1.14.6)
Collecting pure-eval
Downloading pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens
Downloading asttokens-2.0.8-py2.py3-none-any.whl (23 kB)
Collecting executing
Downloading executing-1.1.0-py2.py3-none-any.whl (22 kB)
Requirement already satisfied: pycparser in ./miniconda3/envs/pytorch-tutorials/lib/python3.8/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook->jupyter) (2.21)
Installing collected packages: webencodings, wcwidth, Send2Trash, pure-eval, ptyprocess, pickleshare, mistune, ipython-genutils, fastjsonschema, executing, backcall, zipp, widgetsnbextension, traitlets, tornado, tinycss2, soupsieve, pyzmq, python-dateutil, pyrsistent, pyparsing, pygments, psutil, prompt-toolkit, prometheus-client, pkgutil-resolve-name, pexpect, parso, pandocfilters, nest-asyncio, markupsafe, jupyterlab-widgets, jupyterlab-pygments, entrypoints, defusedxml, decorator, debugpy, bleach, attrs, asttokens, terminado, stack-data, packaging, matplotlib-inline, jupyter-core, jinja2, jedi, importlib-resources, importlib-metadata, beautifulsoup4, argon2-cffi-bindings, qtpy, jupyter-client, jsonschema, ipython, argon2-cffi, nbformat, ipykernel, qtconsole, nbclient, jupyter-console, ipywidgets, nbconvert, notebook, jupyter
Successfully installed Send2Trash-1.8.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 asttokens-2.0.8 attrs-22.1.0 backcall-0.2.0 beautifulsoup4-4.11.1 bleach-5.0.1 debugpy-1.6.3 decorator-5.1.1 defusedxml-0.7.1 entrypoints-0.4 executing-1.1.0 fastjsonschema-2.16.2 importlib-metadata-5.0.0 importlib-resources-5.10.0 ipykernel-6.16.0 ipython-8.5.0 ipython-genutils-0.2.0 ipywidgets-8.0.2 jedi-0.18.1 jinja2-3.1.2 jsonschema-4.16.0 jupyter-1.0.0 jupyter-client-7.3.5 jupyter-console-6.4.4 jupyter-core-4.11.1 jupyterlab-pygments-0.2.2 jupyterlab-widgets-3.0.3 markupsafe-2.1.1 matplotlib-inline-0.1.6 mistune-2.0.4 nbclient-0.7.0 nbconvert-7.2.1 nbformat-5.6.1 nest-asyncio-1.5.6 notebook-6.4.12 packaging-21.3 pandocfilters-1.5.0 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 pkgutil-resolve-name-1.3.10 prometheus-client-0.14.1 prompt-toolkit-3.0.31 psutil-5.9.2 ptyprocess-0.7.0 pure-eval-0.2.2 pygments-2.13.0 pyparsing-3.0.9 pyrsistent-0.18.1 python-dateutil-2.8.2 pyzmq-24.0.1 qtconsole-5.3.2 qtpy-2.2.1 soupsieve-2.3.2.post1 stack-data-0.5.1 terminado-0.16.0 tinycss2-1.1.1 tornado-6.2 traitlets-5.4.0 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-4.0.3 zipp-3.8.1
(pytorch-tutorials) luyanfeng@amax:~$ pip list
Package Version
-------------------- -----------
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.0.8
attrs 22.1.0
backcall 0.2.0
beautifulsoup4 4.11.1
bleach 5.0.1
brotlipy 0.7.0
certifi 2022.9.24
cffi 1.14.6
charset-normalizer 2.1.1
cryptography 37.0.2
debugpy 1.6.3
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
executing 1.1.0
fastjsonschema 2.16.2
idna 3.4
importlib-metadata 5.0.0
importlib-resources 5.10.0
ipykernel 6.16.0
ipython 8.5.0
ipython-genutils 0.2.0
ipywidgets 8.0.2
jedi 0.18.1
Jinja2 3.1.2
jsonschema 4.16.0
jupyter 1.0.0
jupyter_client 7.3.5
jupyter-console 6.4.4
jupyter-core 4.11.1
jupyterlab-pygments 0.2.2
jupyterlab-widgets 3.0.3
MarkupSafe 2.1.1
matplotlib-inline 0.1.6
mistune 2.0.4
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
nbclient 0.7.0
nbconvert 7.2.1
nbformat 5.6.1
nest-asyncio 1.5.6
notebook 6.4.12
numpy 1.23.1
olefile 0.46
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.2.0
pip 22.2.2
pkgutil_resolve_name 1.3.10
prometheus-client 0.14.1
prompt-toolkit 3.0.31
psutil 5.9.2
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
Pygments 2.13.0
pyOpenSSL 22.0.0
pyparsing 3.0.9
pyrsistent 0.18.1
PySocks 1.7.1
python-dateutil 2.8.2
pyzmq 24.0.1
qtconsole 5.3.2
QtPy 2.2.1
requests 2.28.1
Send2Trash 1.8.0
setuptools 63.4.1
six 1.16.0
soupsieve 2.3.2.post1
stack-data 0.5.1
terminado 0.16.0
tinycss2 1.1.1
torch 1.12.1
torchaudio 0.12.1
torchvision 0.13.1
tornado 6.2
traitlets 5.4.0
typing_extensions 4.4.0
urllib3 1.26.11
wcwidth 0.2.5
webencodings 0.5.1
wheel 0.37.1
widgetsnbextension 4.0.3
zipp 3.8.1
(pytorch-tutorials) luyanfeng@amax:~$ jupyter notebook password
Enter password:
Verify password:
[NotebookPasswordApp] Wrote hashed password to /home/luyanfeng/.jupyter/jupyter_notebook_config.json
(pytorch-tutorials) luyanfeng@amax:~$ jupyter notebook --generate-config
Writing default config to: /home/luyanfeng/.jupyter/jupyter_notebook_config.py
(pytorch-tutorials) luyanfeng@amax:~$ cat /home/luyanfeng/.jupyter/jupyter_notebook_config.py
# Configuration file for jupyter-notebook.

c = get_config() # noqa

#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.

## The date format used by logging formatters for %(asctime)s
# Default: '%Y-%m-%d %H:%M:%S'
# c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# Default: '[%(name)s]%(highlevel)s %(message)s'
# c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set the log level by value or name.
# Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
# Default: 30
# c.Application.log_level = 30

## Configure additional log handlers.
#
# The default stderr logs handler is configured by the log_level, log_datefmt
# and log_format settings.
#
# This configuration can be used to configure additional handlers (e.g. to
# output the log to a file) or for finer control over the default handlers.
#
# If provided this should be a logging configuration dictionary, for more
# information see:
# https://docs.python.org/3/library/logging.config.html#logging-config-
# dictschema
#
# This dictionary is merged with the base logging configuration which defines
# the following:
#
# * A logging formatter intended for interactive use called
# ``console``.
# * A logging handler that writes to stderr called
# ``console`` which uses the formatter ``console``.
# * A logger with the name of this application set to ``DEBUG``
# level.
#
# This example adds a new handler that writes to a file:
#
# .. code-block:: python
#
# c.Application.logging_config = {
# 'handlers': {
# 'file': {
# 'class': 'logging.FileHandler',
# 'level': 'DEBUG',
# 'filename': '<path/to/file>',
# }
# },
# 'loggers': {
# '<application-name>': {
# 'level': 'DEBUG',
# # NOTE: if you don't list the default "console"
# # handler here then it will be disabled
# 'handlers': ['console', 'file'],
# },
# }
# }
# Default: {}
# c.Application.logging_config = {}

## Instead of starting the Application, dump configuration to stdout
# Default: False
# c.Application.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# Default: False
# c.Application.show_config_json = False

#------------------------------------------------------------------------------
# JupyterApp(Application) configuration
#------------------------------------------------------------------------------
## Base class for Jupyter applications

## Answer yes to any prompts.
# Default: False
# c.JupyterApp.answer_yes = False

## Full path of a config file.
# Default: ''
# c.JupyterApp.config_file = ''

## Specify a config file to load.
# Default: ''
# c.JupyterApp.config_file_name = ''

## Generate default config file.
# Default: False
# c.JupyterApp.generate_config = False

## The date format used by logging formatters for %(asctime)s
# See also: Application.log_datefmt
# c.JupyterApp.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# See also: Application.log_format
# c.JupyterApp.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set the log level by value or name.
# See also: Application.log_level
# c.JupyterApp.log_level = 30

##
# See also: Application.logging_config
# c.JupyterApp.logging_config = {}

## Instead of starting the Application, dump configuration to stdout
# See also: Application.show_config
# c.JupyterApp.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# See also: Application.show_config_json
# c.JupyterApp.show_config_json = False

#------------------------------------------------------------------------------
# NotebookApp(JupyterApp) configuration
#------------------------------------------------------------------------------
## Set the Access-Control-Allow-Credentials: true header
# Default: False
# c.NotebookApp.allow_credentials = False

## Set the Access-Control-Allow-Origin header
#
# Use '*' to allow any origin to access your server.
#
# Takes precedence over allow_origin_pat.
# Default: ''
# c.NotebookApp.allow_origin = ''

## Use a regular expression for the Access-Control-Allow-Origin header
#
# Requests from an origin matching the expression will get replies with:
#
# Access-Control-Allow-Origin: origin
#
# where `origin` is the origin of the request.
#
# Ignored if allow_origin is set.
# Default: ''
# c.NotebookApp.allow_origin_pat = ''

## Allow password to be changed at login for the notebook server.
#
# While logging in with a token, the notebook server UI will give the opportunity to
# the user to enter a new password at the same time that will replace
# the token login mechanism.
#
# This can be set to false to prevent changing password from
# the UI/API.
# Default: True
# c.NotebookApp.allow_password_change = True

## Allow requests where the Host header doesn't point to a local server
#
# By default, requests get a 403 forbidden response if the 'Host' header
# shows that the browser thinks it's on a non-local domain.
# Setting this option to True disables this check.
#
# This protects against 'DNS rebinding' attacks, where a remote web server
# serves you a page and then changes its DNS to send later requests to a
# local IP, bypassing same-origin checks.
#
# Local IP addresses (such as 127.0.0.1 and ::1) are allowed as local,
# along with hostnames configured in local_hostnames.
# Default: False
# c.NotebookApp.allow_remote_access = False

## Whether to allow the user to run the notebook as root.
# Default: False
# c.NotebookApp.allow_root = False

## Answer yes to any prompts.
# See also: JupyterApp.answer_yes
# c.NotebookApp.answer_yes = False

## "
# Require authentication to access prometheus metrics.
# Default: True
# c.NotebookApp.authenticate_prometheus = True

## Reload the webapp when changes are made to any Python src files.
# Default: False
# c.NotebookApp.autoreload = False

## DEPRECATED use base_url
# Default: '/'
# c.NotebookApp.base_project_url = '/'

## The base URL for the notebook server.
#
# Leading and trailing slashes can be omitted,
# and will automatically be added.
# Default: '/'
# c.NotebookApp.base_url = '/'

## Specify what command to use to invoke a web
# browser when opening the notebook. If not specified, the
# default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the
# BROWSER environment variable to override it.
# Default: ''
# c.NotebookApp.browser = ''

## The full path to an SSL/TLS certificate file.
# Default: ''
# c.NotebookApp.certfile = ''

## The full path to a certificate authority certificate for SSL/TLS client
# authentication.
# Default: ''
# c.NotebookApp.client_ca = ''

## Full path of a config file.
# See also: JupyterApp.config_file
# c.NotebookApp.config_file = ''

## Specify a config file to load.
# See also: JupyterApp.config_file_name
# c.NotebookApp.config_file_name = ''

## The config manager class to use
# Default: 'notebook.services.config.manager.ConfigManager'
# c.NotebookApp.config_manager_class = 'notebook.services.config.manager.ConfigManager'

## The notebook manager class to use.
# Default: 'notebook.services.contents.largefilemanager.LargeFileManager'
# c.NotebookApp.contents_manager_class = 'notebook.services.contents.largefilemanager.LargeFileManager'

## Extra keyword arguments to pass to `set_secure_cookie`. See tornado's
# set_secure_cookie docs for details.
# Default: {}
# c.NotebookApp.cookie_options = {}

## The random bytes used to secure cookies.
# By default this is a new random number every time you start the Notebook.
# Set it to a value in a config file to enable logins to persist across server sessions.
#
# Note: Cookie secrets should be kept private, do not share config files with
# cookie_secret stored in plaintext (you can read the value from a file).
# Default: b''
# c.NotebookApp.cookie_secret = b''

## The file where the cookie secret is stored.
# Default: ''
# c.NotebookApp.cookie_secret_file = ''

## Override URL shown to users.
#
# Replace actual URL, including protocol, address, port and base URL,
# with the given value when displaying URL to the users. Do not change
# the actual connection URL. If authentication token is enabled, the
# token is added to the custom URL automatically.
#
# This option is intended to be used when the URL to display to the user
# cannot be determined reliably by the Jupyter notebook server (proxified
# or containerized setups for example).
# Default: ''
# c.NotebookApp.custom_display_url = ''

## The default URL to redirect to from `/`
# Default: '/tree'
# c.NotebookApp.default_url = '/tree'

## Disable cross-site-request-forgery protection
#
# Jupyter notebook 4.3.1 introduces protection from cross-site request forgeries,
# requiring API requests to either:
#
# - originate from pages served by this server (validated with XSRF cookie and token), or
# - authenticate with a token
#
# Some anonymous compute resources still desire the ability to run code,
# completely without authentication.
# These services can disable all authentication and security checks,
# with the full knowledge of what that implies.
# Default: False
# c.NotebookApp.disable_check_xsrf = False

## Whether to enable MathJax for typesetting math/TeX
#
# MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
# very large, so you may want to disable it if you have a slow internet
# connection, or for offline use of the notebook.
#
# When disabled, equations etc. will appear as their untransformed TeX
# source.
# Default: True
# c.NotebookApp.enable_mathjax = True

## extra paths to look for Javascript notebook extensions
# Default: []
# c.NotebookApp.extra_nbextensions_path = []

## handlers that should be loaded at higher priority than the default services
# Default: []
# c.NotebookApp.extra_services = []

## Extra paths to search for serving static files.
#
# This allows adding javascript/css to be available from the notebook server machine,
# or overriding individual files in the IPython
# Default: []
# c.NotebookApp.extra_static_paths = []

## Extra paths to search for serving jinja templates.
#
# Can be used to override templates from notebook.templates.
# Default: []
# c.NotebookApp.extra_template_paths = []

# Default: ''
# c.NotebookApp.file_to_run = ''

## Generate default config file.
# See also: JupyterApp.generate_config
# c.NotebookApp.generate_config = False

## Extra keyword arguments to pass to `get_secure_cookie`. See tornado's
# get_secure_cookie docs for details.
# Default: {}
# c.NotebookApp.get_secure_cookie_kwargs = {}

## Deprecated: Use minified JS file or not, mainly use during dev to avoid JS
# recompilation
# Default: False
# c.NotebookApp.ignore_minified_js = False

## (bytes/sec)
# Maximum rate at which stream output can be sent on iopub before they are
# limited.
# Default: 1000000
# c.NotebookApp.iopub_data_rate_limit = 1000000

## (msgs/sec)
# Maximum rate at which messages can be sent on iopub before they are
# limited.
# Default: 1000
# c.NotebookApp.iopub_msg_rate_limit = 1000

## The IP address the notebook server will listen on.
# Default: 'localhost'
# c.NotebookApp.ip = 'localhost'

## Supply extra arguments that will be passed to Jinja environment.
# Default: {}
# c.NotebookApp.jinja_environment_options = {}

## Extra variables to supply to jinja templates when rendering.
# Default: {}
# c.NotebookApp.jinja_template_vars = {}

## The kernel manager class to use.
# Default: 'notebook.services.kernels.kernelmanager.MappingKernelManager'
# c.NotebookApp.kernel_manager_class = 'notebook.services.kernels.kernelmanager.MappingKernelManager'

## The kernel spec manager class to use. Should be a subclass of
# `jupyter_client.kernelspec.KernelSpecManager`.
#
# The Api of KernelSpecManager is provisional and might change without warning
# between this version of Jupyter and the next stable one.
# Default: 'jupyter_client.kernelspec.KernelSpecManager'
# c.NotebookApp.kernel_spec_manager_class = 'jupyter_client.kernelspec.KernelSpecManager'

## The full path to a private key file for usage with SSL/TLS.
# Default: ''
# c.NotebookApp.keyfile = ''

## Hostnames to allow as local when allow_remote_access is False.
#
# Local IP addresses (such as 127.0.0.1 and ::1) are automatically accepted
# as local as well.
# Default: ['localhost']
# c.NotebookApp.local_hostnames = ['localhost']

## The date format used by logging formatters for %(asctime)s
# See also: Application.log_datefmt
# c.NotebookApp.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# See also: Application.log_format
# c.NotebookApp.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set to True to enable JSON formatted logs. Run "pip install notebook[json-
# logging]" to install the required dependent packages. Can also be set using
# the environment variable JUPYTER_ENABLE_JSON_LOGGING=true.
# Default: False
# c.NotebookApp.log_json = False

## Set the log level by value or name.
# See also: Application.log_level
# c.NotebookApp.log_level = 30

##
# See also: Application.logging_config
# c.NotebookApp.logging_config = {}

## The login handler class to use.
# Default: 'notebook.auth.login.LoginHandler'
# c.NotebookApp.login_handler_class = 'notebook.auth.login.LoginHandler'

## The logout handler class to use.
# Default: 'notebook.auth.logout.LogoutHandler'
# c.NotebookApp.logout_handler_class = 'notebook.auth.logout.LogoutHandler'

## The MathJax.js configuration file that is to be used.
# Default: 'TeX-AMS-MML_HTMLorMML-full,Safe'
# c.NotebookApp.mathjax_config = 'TeX-AMS-MML_HTMLorMML-full,Safe'

## A custom url for MathJax.js.
# Should be in the form of a case-sensitive url to MathJax,
# for example: /static/components/MathJax/MathJax.js
# Default: ''
# c.NotebookApp.mathjax_url = ''

## Sets the maximum allowed size of the client request body, specified in the
# Content-Length request header field. If the size in a request exceeds the
# configured value, a malformed HTTP message is returned to the client.
#
# Note: max_body_size is applied even in streaming mode.
# Default: 536870912
# c.NotebookApp.max_body_size = 536870912

## Gets or sets the maximum amount of memory, in bytes, that is allocated for use
# by the buffer manager.
# Default: 536870912
# c.NotebookApp.max_buffer_size = 536870912

## Gets or sets a lower bound on the open file handles process resource limit.
# This may need to be increased if you run into an OSError: [Errno 24] Too many
# open files. This is not applicable when running on Windows.
# Default: 0
# c.NotebookApp.min_open_files_limit = 0

## Dict of Python modules to load as notebook server extensions. Entry values can
# be used to enable and disable the loading of the extensions. The extensions
# will be loaded in alphabetical order.
# Default: {}
# c.NotebookApp.nbserver_extensions = {}

## The directory to use for notebooks and kernels.
# Default: ''
# c.NotebookApp.notebook_dir = ''

## Whether to open in a browser after starting.
# The specific browser used is platform dependent and
# determined by the python standard library `webbrowser`
# module, unless it is overridden using the --browser
# (NotebookApp.browser) configuration option.
# Default: True
# c.NotebookApp.open_browser = True

## Hashed password to use for web authentication.
#
# To generate, type in a python/IPython shell:
#
# from notebook.auth import passwd; passwd()
#
# The string should be of the form type:salt:hashed-
# password.
# Default: ''
# c.NotebookApp.password = ''

## Forces users to use a password for the Notebook server.
# This is useful in a multi user environment, for instance when
# everybody in the LAN can access each other's machine through ssh.
#
# In such a case, serving the notebook server on localhost is not secure
# since any user can connect to the notebook server via ssh.
# Default: False
# c.NotebookApp.password_required = False

## The port the notebook server will listen on (env: JUPYTER_PORT).
# Default: 8888
# c.NotebookApp.port = 8888

## The number of additional ports to try if the specified port is not available
# (env: JUPYTER_PORT_RETRIES).
# Default: 50
# c.NotebookApp.port_retries = 50

## DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
# Default: 'disabled'
# c.NotebookApp.pylab = 'disabled'

## If True, display a button in the dashboard to quit
# (shutdown the notebook server).
# Default: True
# c.NotebookApp.quit_button = True

## (sec) Time window used to
# check the message and data rate limits.
# Default: 3
# c.NotebookApp.rate_limit_window = 3

## Reraise exceptions encountered loading server extensions?
# Default: False
# c.NotebookApp.reraise_server_extension_failures = False

## DEPRECATED use the nbserver_extensions dict instead
# Default: []
# c.NotebookApp.server_extensions = []

## The session manager class to use.
# Default: 'notebook.services.sessions.sessionmanager.SessionManager'
# c.NotebookApp.session_manager_class = 'notebook.services.sessions.sessionmanager.SessionManager'

## Instead of starting the Application, dump configuration to stdout
# See also: Application.show_config
# c.NotebookApp.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# See also: Application.show_config_json
# c.NotebookApp.show_config_json = False

## Shut down the server after N seconds with no kernels or terminals running and
# no activity. This can be used together with culling idle kernels
# (MappingKernelManager.cull_idle_timeout) to shutdown the notebook server when
# it's not in use. This is not precisely timed: it may shut down up to a minute
# later. 0 (the default) disables this automatic shutdown.
# Default: 0
# c.NotebookApp.shutdown_no_activity_timeout = 0

## The UNIX socket the notebook server will listen on.
# Default: ''
# c.NotebookApp.sock = ''

## The permissions mode for UNIX socket creation (default: 0600).
# Default: '0600'
# c.NotebookApp.sock_mode = '0600'

## Supply SSL options for the tornado HTTPServer.
# See the tornado docs for details.
# Default: {}
# c.NotebookApp.ssl_options = {}

## Supply overrides for terminado. Currently only supports "shell_command". On
# Unix, if "shell_command" is not provided, a non-login shell is launched by
# default when the notebook server is connected to a terminal, a login shell
# otherwise.
# Default: {}
# c.NotebookApp.terminado_settings = {}

## Set to False to disable terminals.
#
# This does *not* make the notebook server more secure by itself.
# Anything the user can in a terminal, they can also do in a notebook.
#
# Terminals may also be automatically disabled if the terminado package
# is not available.
# Default: True
# c.NotebookApp.terminals_enabled = True

## Token used for authenticating first-time connections to the server.
#
# The token can be read from the file referenced by JUPYTER_TOKEN_FILE or set directly
# with the JUPYTER_TOKEN environment variable.
#
# When no password is enabled,
# the default is to generate a new, random token.
#
# Setting to an empty string disables authentication altogether, which
# is NOT RECOMMENDED.
# Default: '<generated>'
# c.NotebookApp.token = '<generated>'

## Supply overrides for the tornado.web.Application that the Jupyter notebook
# uses.
# Default: {}
# c.NotebookApp.tornado_settings = {}

## Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headers sent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
# Default: False
# c.NotebookApp.trust_xheaders = False

## Disable launching browser by redirect file
#
# For versions of notebook > 5.7.2, a security feature measure was added that
# prevented the authentication token used to launch the browser from being visible.
# This feature makes it difficult for other users on a multi-user system from
# running code in your Jupyter session as you.
#
# However, some environments (like Windows Subsystem for Linux (WSL) and Chromebooks),
# launching a browser using a redirect file can lead the browser failing to load.
# This is because of the difference in file structures/paths between the runtime and
# the browser.
#
# Disabling this setting to False will disable this behavior, allowing the browser
# to launch by using a URL and visible token (as before).
# Default: True
# c.NotebookApp.use_redirect_file = True

## DEPRECATED, use tornado_settings
# Default: {}
# c.NotebookApp.webapp_settings = {}

## Specify Where to open the notebook on startup. This is the
# `new` argument passed to the standard library method `webbrowser.open`.
# The behaviour is not guaranteed, but depends on browser support. Valid
# values are:
#
# - 2 opens a new tab,
# - 1 opens a new window,
# - 0 opens in an existing window.
#
# See the `webbrowser.open` documentation for details.
# Default: 2
# c.NotebookApp.webbrowser_open_new = 2

## Set the tornado compression options for websocket connections.
#
# This value will be returned from
# :meth:`WebSocketHandler.get_compression_options`. None (default) will disable
# compression. A dict (even an empty one) will enable compression.
#
# See the tornado docs for WebSocketHandler.get_compression_options for details.
# Default: None
# c.NotebookApp.websocket_compression_options = None

## The base URL for websockets,
# if it differs from the HTTP server (hint: it almost certainly doesn't).
#
# Should be in the form of an HTTP origin: ws[s]://hostname[:port]
# Default: ''
# c.NotebookApp.websocket_url = ''

#------------------------------------------------------------------------------
# ConnectionFileMixin(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Mixin for configurable classes that work with connection files

## JSON file in which to store connection info [default: kernel-<pid>.json]
#
# This file will contain the IP, ports, and authentication key needed to connect
# clients to this kernel. By default, this file will be created in the security dir
# of the current profile, but can be specified by absolute path.
# Default: ''
# c.ConnectionFileMixin.connection_file = ''

## set the control (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.control_port = 0

## set the heartbeat port [default: random]
# Default: 0
# c.ConnectionFileMixin.hb_port = 0

## set the iopub (PUB) port [default: random]
# Default: 0
# c.ConnectionFileMixin.iopub_port = 0

## Set the kernel's IP address [default localhost].
# If the IP address is something other than localhost, then
# Consoles on other machines will be able to connect
# to the Kernel, so be careful!
# Default: ''
# c.ConnectionFileMixin.ip = ''

## set the shell (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.shell_port = 0

## set the stdin (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.stdin_port = 0

# Choices: any of ['tcp', 'ipc'] (case-insensitive)
# Default: 'tcp'
# c.ConnectionFileMixin.transport = 'tcp'

#------------------------------------------------------------------------------
# KernelManager(ConnectionFileMixin) configuration
#------------------------------------------------------------------------------
## Manages a single kernel in a subprocess on this host.
#
# This version starts kernels with Popen.

## Should we autorestart the kernel if it dies.
# Default: True
# c.KernelManager.autorestart = True

## JSON file in which to store connection info [default: kernel-<pid>.json]
# See also: ConnectionFileMixin.connection_file
# c.KernelManager.connection_file = ''

## set the control (ROUTER) port [default: random]
# See also: ConnectionFileMixin.control_port
# c.KernelManager.control_port = 0

## set the heartbeat port [default: random]
# See also: ConnectionFileMixin.hb_port
# c.KernelManager.hb_port = 0

## set the iopub (PUB) port [default: random]
# See also: ConnectionFileMixin.iopub_port
# c.KernelManager.iopub_port = 0

## Set the kernel's IP address [default localhost].
# See also: ConnectionFileMixin.ip
# c.KernelManager.ip = ''

## set the shell (ROUTER) port [default: random]
# See also: ConnectionFileMixin.shell_port
# c.KernelManager.shell_port = 0

## Time to wait for a kernel to terminate before killing it, in seconds. When a
# shutdown request is initiated, the kernel will be immediately sent an
# interrupt (SIGINT), followedby a shutdown_request message, after 1/2 of
# `shutdown_wait_time`it will be sent a terminate (SIGTERM) request, and finally
# at the end of `shutdown_wait_time` will be killed (SIGKILL). terminate and
# kill may be equivalent on windows. Note that this value can beoverridden by
# the in-use kernel provisioner since shutdown times mayvary by provisioned
# environment.
# Default: 5.0
# c.KernelManager.shutdown_wait_time = 5.0

## set the stdin (ROUTER) port [default: random]
# See also: ConnectionFileMixin.stdin_port
# c.KernelManager.stdin_port = 0

# See also: ConnectionFileMixin.transport
# c.KernelManager.transport = 'tcp'

#------------------------------------------------------------------------------
# Session(Configurable) configuration
#------------------------------------------------------------------------------
## Object for handling serialization and sending of messages.
#
# The Session object handles building messages and sending them
# with ZMQ sockets or ZMQStream objects. Objects can communicate with each
# other over the network via Session objects, and only need to work with the
# dict-based IPython message spec. The Session will handle
# serialization/deserialization, security, and metadata.
#
# Sessions support configurable serialization via packer/unpacker traits,
# and signing with HMAC digests via the key/keyfile traits.
#
# Parameters
# ----------
#
# debug : bool
# whether to trigger extra debugging statements
# packer/unpacker : str : 'json', 'pickle' or import_string
# importstrings for methods to serialize message parts. If just
# 'json' or 'pickle', predefined JSON and pickle packers will be used.
# Otherwise, the entire importstring must be used.
#
# The functions must accept at least valid JSON input, and output
# *bytes*.
#
# For example, to use msgpack:
# packer = 'msgpack.packb', unpacker='msgpack.unpackb'
# pack/unpack : callables
# You can also set the pack/unpack callables for serialization directly.
# session : bytes
# the ID of this Session object. The default is to generate a new UUID.
# username : unicode
# username added to message headers. The default is to ask the OS.
# key : bytes
# The key used to initialize an HMAC signature. If unset, messages
# will not be signed or checked.
# keyfile : filepath
# The file containing a key. If this is set, `key` will be initialized
# to the contents of the file.

## Threshold (in bytes) beyond which an object's buffer should be extracted to
# avoid pickling.
# Default: 1024
# c.Session.buffer_threshold = 1024

## Whether to check PID to protect against calls after fork.
#
# This check can be disabled if fork-safety is handled elsewhere.
# Default: True
# c.Session.check_pid = True

## Threshold (in bytes) beyond which a buffer should be sent without copying.
# Default: 65536
# c.Session.copy_threshold = 65536

## Debug output in the Session
# Default: False
# c.Session.debug = False

## The maximum number of digests to remember.
#
# The digest history will be culled when it exceeds this value.
# Default: 65536
# c.Session.digest_history_size = 65536

## The maximum number of items for a container to be introspected for custom serialization.
# Containers larger than this are pickled outright.
# Default: 64
# c.Session.item_threshold = 64

## execution key, for signing messages.
# Default: b''
# c.Session.key = b''

## path to file containing execution key.
# Default: ''
# c.Session.keyfile = ''

## Metadata dictionary, which serves as the default top-level metadata dict for
# each message.
# Default: {}
# c.Session.metadata = {}

## The name of the packer for serializing messages.
# Should be one of 'json', 'pickle', or an import name
# for a custom callable serializer.
# Default: 'json'
# c.Session.packer = 'json'

## The UUID identifying this session.
# Default: ''
# c.Session.session = ''

## The digest scheme used to construct the message signatures.
# Must have the form 'hmac-HASH'.
# Default: 'hmac-sha256'
# c.Session.signature_scheme = 'hmac-sha256'

## The name of the unpacker for unserializing messages.
# Only used with custom functions for `packer`.
# Default: 'json'
# c.Session.unpacker = 'json'

## Username for the Session. Default is your system username.
# Default: 'luyanfeng'
# c.Session.username = 'luyanfeng'

#------------------------------------------------------------------------------
# MultiKernelManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## A class for managing multiple kernels.

## The name of the default kernel to start
# Default: 'python3'
# c.MultiKernelManager.default_kernel_name = 'python3'

## The kernel manager class. This is configurable to allow
# subclassing of the KernelManager for customized behavior.
# Default: 'jupyter_client.ioloop.IOLoopKernelManager'
# c.MultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager'

## Share a single zmq.Context to talk to all my kernels
# Default: True
# c.MultiKernelManager.shared_context = True

#------------------------------------------------------------------------------
# MappingKernelManager(MultiKernelManager) configuration
#------------------------------------------------------------------------------
## A KernelManager that handles notebook mapping and HTTP error handling

## White list of allowed kernel message types.
# When the list is empty, all message types are allowed.
# Default: []
# c.MappingKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be buffered in-memory.
# When True (default), messages are buffered and replayed on reconnect,
# avoiding lost messages due to interrupted connectivity.
# Disable if long-running kernels will produce too much output while
# no frontends are connected.
# Default: True
# c.MappingKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# Only effective if cull_idle_timeout > 0.
# Default: False
# c.MappingKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# Only effective if cull_idle_timeout > 0.
# Default: False
# c.MappingKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be culled.
# Values of 0 or lower disable culling. Very short timeouts may result in kernels being culled
# for users with poor network connections.
# Default: 0
# c.MappingKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# Default: 300
# c.MappingKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.MappingKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# On starting and restarting kernels, we check whether the
# kernel is running and responsive by sending kernel_info_requests.
# This sets the timeout in seconds for how long the kernel can take
# before being presumed dead.
# This affects the MappingKernelManager (which handles kernel restarts)
# and the ZMQChannelsHandler (which handles the startup).
# Default: 60
# c.MappingKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: MultiKernelManager.kernel_manager_class
# c.MappingKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager'

# Default: ''
# c.MappingKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.MappingKernelManager.shared_context = True

#------------------------------------------------------------------------------
# KernelSpecManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## List of allowed kernel names.
#
# By default, all installed kernels are allowed.
# Default: set()
# c.KernelSpecManager.allowed_kernelspecs = set()

## If there is no Python kernelspec registered and the IPython
# kernel is available, ensure it is added to the spec list.
# Default: True
# c.KernelSpecManager.ensure_native_kernel = True

## The kernel spec class. This is configurable to allow
# subclassing of the KernelSpecManager for customized behavior.
# Default: 'jupyter_client.kernelspec.KernelSpec'
# c.KernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec'

## Deprecated, use `KernelSpecManager.allowed_kernelspecs`
# Default: set()
# c.KernelSpecManager.whitelist = set()

#------------------------------------------------------------------------------
# ContentsManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Base class for serving files and directories.
#
# This serves any text or binary file,
# as well as directories,
# with special handling for JSON notebook documents.
#
# Most APIs take a path argument,
# which is always an API-style unicode path,
# and always refers to a directory.
#
# - unicode, not url-escaped
# - '/'-separated
# - leading and trailing '/' will be stripped
# - if unspecified, path defaults to '',
# indicating the root path.

## Allow access to hidden files
# Default: False
# c.ContentsManager.allow_hidden = False

# Default: None
# c.ContentsManager.checkpoints = None

# Default: 'notebook.services.contents.checkpoints.Checkpoints'
# c.ContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints'

# Default: {}
# c.ContentsManager.checkpoints_kwargs = {}

## handler class to use when serving raw file requests.
#
# Default is a fallback that talks to the ContentsManager API,
# which may be inefficient, especially for large files.
#
# Local files-based ContentsManagers can use a StaticFileHandler subclass,
# which will be much more efficient.
#
# Access to these files should be Authenticated.
# Default: 'notebook.files.handlers.FilesHandler'
# c.ContentsManager.files_handler_class = 'notebook.files.handlers.FilesHandler'

## Extra parameters to pass to files_handler_class.
#
# For example, StaticFileHandlers generally expect a `path` argument
# specifying the root directory from which to serve files.
# Default: {}
# c.ContentsManager.files_handler_params = {}

## Glob patterns to hide in file and directory listings.
# Default: ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']
# c.ContentsManager.hide_globs = ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']

## Python callable or importstring thereof
#
# To be called on a contents model prior to save.
#
# This can be used to process the structure,
# such as removing notebook outputs or other side effects that
# should not be saved.
#
# It will be called as (all arguments passed by keyword)::
#
# hook(path=path, model=model, contents_manager=self)
#
# - model: the model to be saved. Includes file contents.
# Modifying this dict will affect the file that is stored.
# - path: the API path of the save destination
# - contents_manager: this ContentsManager instance
# Default: None
# c.ContentsManager.pre_save_hook = None

# Default: '/'
# c.ContentsManager.root_dir = '/'

## The base name used when creating untitled directories.
# Default: 'Untitled Folder'
# c.ContentsManager.untitled_directory = 'Untitled Folder'

## The base name used when creating untitled files.
# Default: 'untitled'
# c.ContentsManager.untitled_file = 'untitled'

## The base name used when creating untitled notebooks.
# Default: 'Untitled'
# c.ContentsManager.untitled_notebook = 'Untitled'

#------------------------------------------------------------------------------
# FileManagerMixin(Configurable) configuration
#------------------------------------------------------------------------------
## Mixin for ContentsAPI classes that interact with the filesystem.
#
# Provides facilities for reading, writing, and copying both notebooks and
# generic files.
#
# Shared by FileContentsManager and FileCheckpoints.
#
# Note ---- Classes using this mixin must provide the following attributes:
#
# root_dir : unicode
# A directory against which API-style paths are to be resolved.
#
# log : logging.Logger

## By default notebooks are saved on disk on a temporary file and then if successfully written, it replaces the old ones.
# This procedure, namely 'atomic_writing', causes some bugs on file system without operation order enforcement (like some networked fs).
# If set to False, the new notebook is written directly on the old one which could fail (eg: full filesystem or quota )
# Default: True
# c.FileManagerMixin.use_atomic_writing = True

#------------------------------------------------------------------------------
# FileContentsManager(FileManagerMixin, ContentsManager) configuration
#------------------------------------------------------------------------------
## Allow access to hidden files
# See also: ContentsManager.allow_hidden
# c.FileContentsManager.allow_hidden = False

# See also: ContentsManager.checkpoints
# c.FileContentsManager.checkpoints = None

# See also: ContentsManager.checkpoints_class
# c.FileContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints'

# See also: ContentsManager.checkpoints_kwargs
# c.FileContentsManager.checkpoints_kwargs = {}

## If True (default), deleting files will send them to the
# platform's trash/recycle bin, where they can be recovered. If False,
# deleting files really deletes them.
# Default: True
# c.FileContentsManager.delete_to_trash = True

## handler class to use when serving raw file requests.
# See also: ContentsManager.files_handler_class
# c.FileContentsManager.files_handler_class = 'notebook.files.handlers.FilesHandler'

## Extra parameters to pass to files_handler_class.
# See also: ContentsManager.files_handler_params
# c.FileContentsManager.files_handler_params = {}

##
# See also: ContentsManager.hide_globs
# c.FileContentsManager.hide_globs = ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']

## Python callable or importstring thereof
#
# to be called on the path of a file just saved.
#
# This can be used to process the file on disk,
# such as converting the notebook to a script or HTML via nbconvert.
#
# It will be called as (all arguments passed by keyword)::
#
# hook(os_path=os_path, model=model, contents_manager=instance)
#
# - path: the filesystem path to the file just written
# - model: the model representing the file
# - contents_manager: this ContentsManager instance
# Default: None
# c.FileContentsManager.post_save_hook = None

## Python callable or importstring thereof
# See also: ContentsManager.pre_save_hook
# c.FileContentsManager.pre_save_hook = None

# Default: ''
# c.FileContentsManager.root_dir = ''

## DEPRECATED, use post_save_hook. Will be removed in Notebook 5.0
# Default: False
# c.FileContentsManager.save_script = False

## The base name used when creating untitled directories.
# See also: ContentsManager.untitled_directory
# c.FileContentsManager.untitled_directory = 'Untitled Folder'

## The base name used when creating untitled files.
# See also: ContentsManager.untitled_file
# c.FileContentsManager.untitled_file = 'untitled'

## The base name used when creating untitled notebooks.
# See also: ContentsManager.untitled_notebook
# c.FileContentsManager.untitled_notebook = 'Untitled'

## By default notebooks are saved on disk on a temporary file and then if
# successfully written, it replaces the old ones.
# See also: FileManagerMixin.use_atomic_writing
# c.FileContentsManager.use_atomic_writing = True

#------------------------------------------------------------------------------
# NotebookNotary(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## A class for computing and verifying notebook signatures.

## The hashing algorithm used to sign notebooks.
# Choices: any of ['sha256', 'sha3_224', 'sha384', 'md5', 'sha3_256', 'sha3_512', 'sha1', 'sha224', 'blake2s', 'sha3_384', 'sha512', 'blake2b']
# Default: 'sha256'
# c.NotebookNotary.algorithm = 'sha256'

## The storage directory for notary secret and database.
# Default: ''
# c.NotebookNotary.data_dir = ''

## The sqlite file in which to store notebook signatures.
# By default, this will be in your Jupyter data directory.
# You can set it to ':memory:' to disable sqlite writing to the filesystem.
# Default: ''
# c.NotebookNotary.db_file = ''

## The secret key with which notebooks are signed.
# Default: b''
# c.NotebookNotary.secret = b''

## The file where the secret key is stored.
# Default: ''
# c.NotebookNotary.secret_file = ''

## A callable returning the storage backend for notebook signatures.
# The default uses an SQLite database.
# Default: traitlets.Undefined
# c.NotebookNotary.store_factory = traitlets.Undefined

#------------------------------------------------------------------------------
# AsyncMultiKernelManager(MultiKernelManager) configuration
#------------------------------------------------------------------------------
## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.AsyncMultiKernelManager.default_kernel_name = 'python3'

## The kernel manager class. This is configurable to allow
# subclassing of the AsyncKernelManager for customized behavior.
# Default: 'jupyter_client.ioloop.AsyncIOLoopKernelManager'
# c.AsyncMultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.AsyncMultiKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# kernel has a `.ready` future which can be awaited before connecting
# Default: False
# c.AsyncMultiKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# AsyncMappingKernelManager(MappingKernelManager, AsyncMultiKernelManager) configuration
#------------------------------------------------------------------------------
## White list of allowed kernel message types.
# See also: MappingKernelManager.allowed_message_types
# c.AsyncMappingKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be
# buffered in-memory.
# See also: MappingKernelManager.buffer_offline_messages
# c.AsyncMappingKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# See also: MappingKernelManager.cull_busy
# c.AsyncMappingKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# See also: MappingKernelManager.cull_connected
# c.AsyncMappingKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be
# culled.
# See also: MappingKernelManager.cull_idle_timeout
# c.AsyncMappingKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# See also: MappingKernelManager.cull_interval
# c.AsyncMappingKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.AsyncMappingKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# See also: MappingKernelManager.kernel_info_timeout
# c.AsyncMappingKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: AsyncMultiKernelManager.kernel_manager_class
# c.AsyncMappingKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

# See also: MappingKernelManager.root_dir
# c.AsyncMappingKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.AsyncMappingKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# See also: AsyncMultiKernelManager.use_pending_kernels
# c.AsyncMappingKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# GatewayKernelManager(AsyncMappingKernelManager) configuration
#------------------------------------------------------------------------------
## Kernel manager that supports remote kernels hosted by Jupyter Kernel or
# Enterprise Gateway.

## White list of allowed kernel message types.
# See also: MappingKernelManager.allowed_message_types
# c.GatewayKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be
# buffered in-memory.
# See also: MappingKernelManager.buffer_offline_messages
# c.GatewayKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# See also: MappingKernelManager.cull_busy
# c.GatewayKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# See also: MappingKernelManager.cull_connected
# c.GatewayKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be
# culled.
# See also: MappingKernelManager.cull_idle_timeout
# c.GatewayKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# See also: MappingKernelManager.cull_interval
# c.GatewayKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.GatewayKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# See also: MappingKernelManager.kernel_info_timeout
# c.GatewayKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: AsyncMultiKernelManager.kernel_manager_class
# c.GatewayKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

# See also: MappingKernelManager.root_dir
# c.GatewayKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.GatewayKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# See also: AsyncMultiKernelManager.use_pending_kernels
# c.GatewayKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# GatewayKernelSpecManager(KernelSpecManager) configuration
#------------------------------------------------------------------------------
## List of allowed kernel names.
# See also: KernelSpecManager.allowed_kernelspecs
# c.GatewayKernelSpecManager.allowed_kernelspecs = set()

## If there is no Python kernelspec registered and the IPython
# See also: KernelSpecManager.ensure_native_kernel
# c.GatewayKernelSpecManager.ensure_native_kernel = True

## The kernel spec class. This is configurable to allow
# See also: KernelSpecManager.kernel_spec_class
# c.GatewayKernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec'

## Deprecated, use `KernelSpecManager.allowed_kernelspecs`
# See also: KernelSpecManager.whitelist
# c.GatewayKernelSpecManager.whitelist = set()

#------------------------------------------------------------------------------
# GatewayClient(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This class manages the configuration. It's its own singleton class so that we
# can share these values across all objects. It also contains some helper methods
# to build request arguments out of the various config options.

## The authorization token used in the HTTP headers. (JUPYTER_GATEWAY_AUTH_TOKEN
# env var)
# Default: None
# c.GatewayClient.auth_token = None

## The filename of CA certificates or None to use defaults.
# (JUPYTER_GATEWAY_CA_CERTS env var)
# Default: None
# c.GatewayClient.ca_certs = None

## The filename for client SSL certificate, if any. (JUPYTER_GATEWAY_CLIENT_CERT
# env var)
# Default: None
# c.GatewayClient.client_cert = None

## The filename for client SSL key, if any. (JUPYTER_GATEWAY_CLIENT_KEY env var)
# Default: None
# c.GatewayClient.client_key = None

## The time allowed for HTTP connection establishment with the Gateway server.
# (JUPYTER_GATEWAY_CONNECT_TIMEOUT env var)
# Default: 40.0
# c.GatewayClient.connect_timeout = 40.0

## A comma-separated list of environment variable names that will be included, along with
# their values, in the kernel startup request. The corresponding `env_whitelist` configuration
# value must also be set on the Gateway server - since that configuration value indicates which
# environmental values to make available to the kernel. (JUPYTER_GATEWAY_ENV_WHITELIST env var)
# Default: ''
# c.GatewayClient.env_whitelist = ''

## The time allowed for HTTP reconnection with the Gateway server for the first time.
# Next will be JUPYTER_GATEWAY_RETRY_INTERVAL multiplied by two in factor of numbers of retries
# but less than JUPYTER_GATEWAY_RETRY_INTERVAL_MAX.
# (JUPYTER_GATEWAY_RETRY_INTERVAL env var)
# Default: 1.0
# c.GatewayClient.gateway_retry_interval = 1.0

## The maximum time allowed for HTTP reconnection retry with the Gateway server.
# (JUPYTER_GATEWAY_RETRY_INTERVAL_MAX env var)
# Default: 30.0
# c.GatewayClient.gateway_retry_interval_max = 30.0

## The maximum retries allowed for HTTP reconnection with the Gateway server.
# (JUPYTER_GATEWAY_RETRY_MAX env var)
# Default: 5
# c.GatewayClient.gateway_retry_max = 5

## Additional HTTP headers to pass on the request. This value will be converted to a dict.
# (JUPYTER_GATEWAY_HEADERS env var)
# Default: '{}'
# c.GatewayClient.headers = '{}'

## The password for HTTP authentication. (JUPYTER_GATEWAY_HTTP_PWD env var)
# Default: None
# c.GatewayClient.http_pwd = None

## The username for HTTP authentication. (JUPYTER_GATEWAY_HTTP_USER env var)
# Default: None
# c.GatewayClient.http_user = None

## The gateway API endpoint for accessing kernel resources
# (JUPYTER_GATEWAY_KERNELS_ENDPOINT env var)
# Default: '/api/kernels'
# c.GatewayClient.kernels_endpoint = '/api/kernels'

## The gateway API endpoint for accessing kernelspecs
# (JUPYTER_GATEWAY_KERNELSPECS_ENDPOINT env var)
# Default: '/api/kernelspecs'
# c.GatewayClient.kernelspecs_endpoint = '/api/kernelspecs'

## The gateway endpoint for accessing kernelspecs resources
# (JUPYTER_GATEWAY_KERNELSPECS_RESOURCE_ENDPOINT env var)
# Default: '/kernelspecs'
# c.GatewayClient.kernelspecs_resource_endpoint = '/kernelspecs'

## The time allowed for HTTP request completion. (JUPYTER_GATEWAY_REQUEST_TIMEOUT
# env var)
# Default: 40.0
# c.GatewayClient.request_timeout = 40.0

## The url of the Kernel or Enterprise Gateway server where
# kernel specifications are defined and kernel management takes place.
# If defined, this Notebook server acts as a proxy for all kernel
# management and kernel specification retrieval. (JUPYTER_GATEWAY_URL env var)
# Default: None
# c.GatewayClient.url = None

## For HTTPS requests, determines if server's certificate should be validated or not.
# (JUPYTER_GATEWAY_VALIDATE_CERT env var)
# Default: True
# c.GatewayClient.validate_cert = True

## The websocket url of the Kernel or Enterprise Gateway server. If not provided, this value
# will correspond to the value of the Gateway url with 'ws' in place of 'http'. (JUPYTER_GATEWAY_WS_URL env var)
# Default: None
# c.GatewayClient.ws_url = None

#------------------------------------------------------------------------------
# TerminalManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
##

## Timeout (in seconds) in which a terminal has been inactive and ready to be culled.
# Values of 0 or lower disable culling.
# Default: 0
# c.TerminalManager.cull_inactive_timeout = 0

## The interval (in seconds) on which to check for terminals exceeding the
# inactive timeout value.
# Default: 300
(pytorch-tutorials) luyanfeng@amax:~$ # 在 /home/luyanfeng/.jupyter/jupyter_notebook_config.py 文件中,找到 # c.NotebookApp.notebook_dir = '',删除 `#`,即取消注释, 并在末尾的 '' 中填写 jupyter notebook 工作目录
(pytorch-tutorials) luyanfeng@amax:~$ vim /home/luyanfeng/.jupyter/jupyter_notebook_config.py
(pytorch-tutorials) luyanfeng@amax:~$ cat /home/luyanfeng/.jupyter/jupyter_notebook_config.py
# Configuration file for jupyter-notebook.

c = get_config() # noqa

#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.

## The date format used by logging formatters for %(asctime)s
# Default: '%Y-%m-%d %H:%M:%S'
# c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# Default: '[%(name)s]%(highlevel)s %(message)s'
# c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set the log level by value or name.
# Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
# Default: 30
# c.Application.log_level = 30

## Configure additional log handlers.
#
# The default stderr logs handler is configured by the log_level, log_datefmt
# and log_format settings.
#
# This configuration can be used to configure additional handlers (e.g. to
# output the log to a file) or for finer control over the default handlers.
#
# If provided this should be a logging configuration dictionary, for more
# information see:
# https://docs.python.org/3/library/logging.config.html#logging-config-
# dictschema
#
# This dictionary is merged with the base logging configuration which defines
# the following:
#
# * A logging formatter intended for interactive use called
# ``console``.
# * A logging handler that writes to stderr called
# ``console`` which uses the formatter ``console``.
# * A logger with the name of this application set to ``DEBUG``
# level.
#
# This example adds a new handler that writes to a file:
#
# .. code-block:: python
#
# c.Application.logging_config = {
# 'handlers': {
# 'file': {
# 'class': 'logging.FileHandler',
# 'level': 'DEBUG',
# 'filename': '<path/to/file>',
# }
# },
# 'loggers': {
# '<application-name>': {
# 'level': 'DEBUG',
# # NOTE: if you don't list the default "console"
# # handler here then it will be disabled
# 'handlers': ['console', 'file'],
# },
# }
# }
# Default: {}
# c.Application.logging_config = {}

## Instead of starting the Application, dump configuration to stdout
# Default: False
# c.Application.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# Default: False
# c.Application.show_config_json = False

#------------------------------------------------------------------------------
# JupyterApp(Application) configuration
#------------------------------------------------------------------------------
## Base class for Jupyter applications

## Answer yes to any prompts.
# Default: False
# c.JupyterApp.answer_yes = False

## Full path of a config file.
# Default: ''
# c.JupyterApp.config_file = ''

## Specify a config file to load.
# Default: ''
# c.JupyterApp.config_file_name = ''

## Generate default config file.
# Default: False
# c.JupyterApp.generate_config = False

## The date format used by logging formatters for %(asctime)s
# See also: Application.log_datefmt
# c.JupyterApp.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# See also: Application.log_format
# c.JupyterApp.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set the log level by value or name.
# See also: Application.log_level
# c.JupyterApp.log_level = 30

##
# See also: Application.logging_config
# c.JupyterApp.logging_config = {}

## Instead of starting the Application, dump configuration to stdout
# See also: Application.show_config
# c.JupyterApp.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# See also: Application.show_config_json
# c.JupyterApp.show_config_json = False

#------------------------------------------------------------------------------
# NotebookApp(JupyterApp) configuration
#------------------------------------------------------------------------------
## Set the Access-Control-Allow-Credentials: true header
# Default: False
# c.NotebookApp.allow_credentials = False

## Set the Access-Control-Allow-Origin header
#
# Use '*' to allow any origin to access your server.
#
# Takes precedence over allow_origin_pat.
# Default: ''
# c.NotebookApp.allow_origin = ''

## Use a regular expression for the Access-Control-Allow-Origin header
#
# Requests from an origin matching the expression will get replies with:
#
# Access-Control-Allow-Origin: origin
#
# where `origin` is the origin of the request.
#
# Ignored if allow_origin is set.
# Default: ''
# c.NotebookApp.allow_origin_pat = ''

## Allow password to be changed at login for the notebook server.
#
# While logging in with a token, the notebook server UI will give the opportunity to
# the user to enter a new password at the same time that will replace
# the token login mechanism.
#
# This can be set to false to prevent changing password from
# the UI/API.
# Default: True
# c.NotebookApp.allow_password_change = True

## Allow requests where the Host header doesn't point to a local server
#
# By default, requests get a 403 forbidden response if the 'Host' header
# shows that the browser thinks it's on a non-local domain.
# Setting this option to True disables this check.
#
# This protects against 'DNS rebinding' attacks, where a remote web server
# serves you a page and then changes its DNS to send later requests to a
# local IP, bypassing same-origin checks.
#
# Local IP addresses (such as 127.0.0.1 and ::1) are allowed as local,
# along with hostnames configured in local_hostnames.
# Default: False
# c.NotebookApp.allow_remote_access = False

## Whether to allow the user to run the notebook as root.
# Default: False
# c.NotebookApp.allow_root = False

## Answer yes to any prompts.
# See also: JupyterApp.answer_yes
# c.NotebookApp.answer_yes = False

## "
# Require authentication to access prometheus metrics.
# Default: True
# c.NotebookApp.authenticate_prometheus = True

## Reload the webapp when changes are made to any Python src files.
# Default: False
# c.NotebookApp.autoreload = False

## DEPRECATED use base_url
# Default: '/'
# c.NotebookApp.base_project_url = '/'

## The base URL for the notebook server.
#
# Leading and trailing slashes can be omitted,
# and will automatically be added.
# Default: '/'
# c.NotebookApp.base_url = '/'

## Specify what command to use to invoke a web
# browser when opening the notebook. If not specified, the
# default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the
# BROWSER environment variable to override it.
# Default: ''
# c.NotebookApp.browser = ''

## The full path to an SSL/TLS certificate file.
# Default: ''
# c.NotebookApp.certfile = ''

## The full path to a certificate authority certificate for SSL/TLS client
# authentication.
# Default: ''
# c.NotebookApp.client_ca = ''

## Full path of a config file.
# See also: JupyterApp.config_file
# c.NotebookApp.config_file = ''

## Specify a config file to load.
# See also: JupyterApp.config_file_name
# c.NotebookApp.config_file_name = ''

## The config manager class to use
# Default: 'notebook.services.config.manager.ConfigManager'
# c.NotebookApp.config_manager_class = 'notebook.services.config.manager.ConfigManager'

## The notebook manager class to use.
# Default: 'notebook.services.contents.largefilemanager.LargeFileManager'
# c.NotebookApp.contents_manager_class = 'notebook.services.contents.largefilemanager.LargeFileManager'

## Extra keyword arguments to pass to `set_secure_cookie`. See tornado's
# set_secure_cookie docs for details.
# Default: {}
# c.NotebookApp.cookie_options = {}

## The random bytes used to secure cookies.
# By default this is a new random number every time you start the Notebook.
# Set it to a value in a config file to enable logins to persist across server sessions.
#
# Note: Cookie secrets should be kept private, do not share config files with
# cookie_secret stored in plaintext (you can read the value from a file).
# Default: b''
# c.NotebookApp.cookie_secret = b''

## The file where the cookie secret is stored.
# Default: ''
# c.NotebookApp.cookie_secret_file = ''

## Override URL shown to users.
#
# Replace actual URL, including protocol, address, port and base URL,
# with the given value when displaying URL to the users. Do not change
# the actual connection URL. If authentication token is enabled, the
# token is added to the custom URL automatically.
#
# This option is intended to be used when the URL to display to the user
# cannot be determined reliably by the Jupyter notebook server (proxified
# or containerized setups for example).
# Default: ''
# c.NotebookApp.custom_display_url = ''

## The default URL to redirect to from `/`
# Default: '/tree'
# c.NotebookApp.default_url = '/tree'

## Disable cross-site-request-forgery protection
#
# Jupyter notebook 4.3.1 introduces protection from cross-site request forgeries,
# requiring API requests to either:
#
# - originate from pages served by this server (validated with XSRF cookie and token), or
# - authenticate with a token
#
# Some anonymous compute resources still desire the ability to run code,
# completely without authentication.
# These services can disable all authentication and security checks,
# with the full knowledge of what that implies.
# Default: False
# c.NotebookApp.disable_check_xsrf = False

## Whether to enable MathJax for typesetting math/TeX
#
# MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
# very large, so you may want to disable it if you have a slow internet
# connection, or for offline use of the notebook.
#
# When disabled, equations etc. will appear as their untransformed TeX
# source.
# Default: True
# c.NotebookApp.enable_mathjax = True

## extra paths to look for Javascript notebook extensions
# Default: []
# c.NotebookApp.extra_nbextensions_path = []

## handlers that should be loaded at higher priority than the default services
# Default: []
# c.NotebookApp.extra_services = []

## Extra paths to search for serving static files.
#
# This allows adding javascript/css to be available from the notebook server machine,
# or overriding individual files in the IPython
# Default: []
# c.NotebookApp.extra_static_paths = []

## Extra paths to search for serving jinja templates.
#
# Can be used to override templates from notebook.templates.
# Default: []
# c.NotebookApp.extra_template_paths = []

# Default: ''
# c.NotebookApp.file_to_run = ''

## Generate default config file.
# See also: JupyterApp.generate_config
# c.NotebookApp.generate_config = False

## Extra keyword arguments to pass to `get_secure_cookie`. See tornado's
# get_secure_cookie docs for details.
# Default: {}
# c.NotebookApp.get_secure_cookie_kwargs = {}

## Deprecated: Use minified JS file or not, mainly use during dev to avoid JS
# recompilation
# Default: False
# c.NotebookApp.ignore_minified_js = False

## (bytes/sec)
# Maximum rate at which stream output can be sent on iopub before they are
# limited.
# Default: 1000000
# c.NotebookApp.iopub_data_rate_limit = 1000000

## (msgs/sec)
# Maximum rate at which messages can be sent on iopub before they are
# limited.
# Default: 1000
# c.NotebookApp.iopub_msg_rate_limit = 1000

## The IP address the notebook server will listen on.
# Default: 'localhost'
# c.NotebookApp.ip = 'localhost'

## Supply extra arguments that will be passed to Jinja environment.
# Default: {}
# c.NotebookApp.jinja_environment_options = {}

## Extra variables to supply to jinja templates when rendering.
# Default: {}
# c.NotebookApp.jinja_template_vars = {}

## The kernel manager class to use.
# Default: 'notebook.services.kernels.kernelmanager.MappingKernelManager'
# c.NotebookApp.kernel_manager_class = 'notebook.services.kernels.kernelmanager.MappingKernelManager'

## The kernel spec manager class to use. Should be a subclass of
# `jupyter_client.kernelspec.KernelSpecManager`.
#
# The Api of KernelSpecManager is provisional and might change without warning
# between this version of Jupyter and the next stable one.
# Default: 'jupyter_client.kernelspec.KernelSpecManager'
# c.NotebookApp.kernel_spec_manager_class = 'jupyter_client.kernelspec.KernelSpecManager'

## The full path to a private key file for usage with SSL/TLS.
# Default: ''
# c.NotebookApp.keyfile = ''

## Hostnames to allow as local when allow_remote_access is False.
#
# Local IP addresses (such as 127.0.0.1 and ::1) are automatically accepted
# as local as well.
# Default: ['localhost']
# c.NotebookApp.local_hostnames = ['localhost']

## The date format used by logging formatters for %(asctime)s
# See also: Application.log_datefmt
# c.NotebookApp.log_datefmt = '%Y-%m-%d %H:%M:%S'

## The Logging format template
# See also: Application.log_format
# c.NotebookApp.log_format = '[%(name)s]%(highlevel)s %(message)s'

## Set to True to enable JSON formatted logs. Run "pip install notebook[json-
# logging]" to install the required dependent packages. Can also be set using
# the environment variable JUPYTER_ENABLE_JSON_LOGGING=true.
# Default: False
# c.NotebookApp.log_json = False

## Set the log level by value or name.
# See also: Application.log_level
# c.NotebookApp.log_level = 30

##
# See also: Application.logging_config
# c.NotebookApp.logging_config = {}

## The login handler class to use.
# Default: 'notebook.auth.login.LoginHandler'
# c.NotebookApp.login_handler_class = 'notebook.auth.login.LoginHandler'

## The logout handler class to use.
# Default: 'notebook.auth.logout.LogoutHandler'
# c.NotebookApp.logout_handler_class = 'notebook.auth.logout.LogoutHandler'

## The MathJax.js configuration file that is to be used.
# Default: 'TeX-AMS-MML_HTMLorMML-full,Safe'
# c.NotebookApp.mathjax_config = 'TeX-AMS-MML_HTMLorMML-full,Safe'

## A custom url for MathJax.js.
# Should be in the form of a case-sensitive url to MathJax,
# for example: /static/components/MathJax/MathJax.js
# Default: ''
# c.NotebookApp.mathjax_url = ''

## Sets the maximum allowed size of the client request body, specified in the
# Content-Length request header field. If the size in a request exceeds the
# configured value, a malformed HTTP message is returned to the client.
#
# Note: max_body_size is applied even in streaming mode.
# Default: 536870912
# c.NotebookApp.max_body_size = 536870912

## Gets or sets the maximum amount of memory, in bytes, that is allocated for use
# by the buffer manager.
# Default: 536870912
# c.NotebookApp.max_buffer_size = 536870912

## Gets or sets a lower bound on the open file handles process resource limit.
# This may need to be increased if you run into an OSError: [Errno 24] Too many
# open files. This is not applicable when running on Windows.
# Default: 0
# c.NotebookApp.min_open_files_limit = 0

## Dict of Python modules to load as notebook server extensions. Entry values can
# be used to enable and disable the loading of the extensions. The extensions
# will be loaded in alphabetical order.
# Default: {}
# c.NotebookApp.nbserver_extensions = {}

## The directory to use for notebooks and kernels.
# Default: ''
c.NotebookApp.notebook_dir = '/home/luyanfeng/my_code/my_github/susu-pytorch-tutorials-notes'

## Whether to open in a browser after starting.
# The specific browser used is platform dependent and
# determined by the python standard library `webbrowser`
# module, unless it is overridden using the --browser
# (NotebookApp.browser) configuration option.
# Default: True
# c.NotebookApp.open_browser = True

## Hashed password to use for web authentication.
#
# To generate, type in a python/IPython shell:
#
# from notebook.auth import passwd; passwd()
#
# The string should be of the form type:salt:hashed-
# password.
# Default: ''
# c.NotebookApp.password = ''

## Forces users to use a password for the Notebook server.
# This is useful in a multi user environment, for instance when
# everybody in the LAN can access each other's machine through ssh.
#
# In such a case, serving the notebook server on localhost is not secure
# since any user can connect to the notebook server via ssh.
# Default: False
# c.NotebookApp.password_required = False

## The port the notebook server will listen on (env: JUPYTER_PORT).
# Default: 8888
# c.NotebookApp.port = 8888

## The number of additional ports to try if the specified port is not available
# (env: JUPYTER_PORT_RETRIES).
# Default: 50
# c.NotebookApp.port_retries = 50

## DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
# Default: 'disabled'
# c.NotebookApp.pylab = 'disabled'

## If True, display a button in the dashboard to quit
# (shutdown the notebook server).
# Default: True
# c.NotebookApp.quit_button = True

## (sec) Time window used to
# check the message and data rate limits.
# Default: 3
# c.NotebookApp.rate_limit_window = 3

## Reraise exceptions encountered loading server extensions?
# Default: False
# c.NotebookApp.reraise_server_extension_failures = False

## DEPRECATED use the nbserver_extensions dict instead
# Default: []
# c.NotebookApp.server_extensions = []

## The session manager class to use.
# Default: 'notebook.services.sessions.sessionmanager.SessionManager'
# c.NotebookApp.session_manager_class = 'notebook.services.sessions.sessionmanager.SessionManager'

## Instead of starting the Application, dump configuration to stdout
# See also: Application.show_config
# c.NotebookApp.show_config = False

## Instead of starting the Application, dump configuration to stdout (as JSON)
# See also: Application.show_config_json
# c.NotebookApp.show_config_json = False

## Shut down the server after N seconds with no kernels or terminals running and
# no activity. This can be used together with culling idle kernels
# (MappingKernelManager.cull_idle_timeout) to shutdown the notebook server when
# it's not in use. This is not precisely timed: it may shut down up to a minute
# later. 0 (the default) disables this automatic shutdown.
# Default: 0
# c.NotebookApp.shutdown_no_activity_timeout = 0

## The UNIX socket the notebook server will listen on.
# Default: ''
# c.NotebookApp.sock = ''

## The permissions mode for UNIX socket creation (default: 0600).
# Default: '0600'
# c.NotebookApp.sock_mode = '0600'

## Supply SSL options for the tornado HTTPServer.
# See the tornado docs for details.
# Default: {}
# c.NotebookApp.ssl_options = {}

## Supply overrides for terminado. Currently only supports "shell_command". On
# Unix, if "shell_command" is not provided, a non-login shell is launched by
# default when the notebook server is connected to a terminal, a login shell
# otherwise.
# Default: {}
# c.NotebookApp.terminado_settings = {}

## Set to False to disable terminals.
#
# This does *not* make the notebook server more secure by itself.
# Anything the user can in a terminal, they can also do in a notebook.
#
# Terminals may also be automatically disabled if the terminado package
# is not available.
# Default: True
# c.NotebookApp.terminals_enabled = True

## Token used for authenticating first-time connections to the server.
#
# The token can be read from the file referenced by JUPYTER_TOKEN_FILE or set directly
# with the JUPYTER_TOKEN environment variable.
#
# When no password is enabled,
# the default is to generate a new, random token.
#
# Setting to an empty string disables authentication altogether, which
# is NOT RECOMMENDED.
# Default: '<generated>'
# c.NotebookApp.token = '<generated>'

## Supply overrides for the tornado.web.Application that the Jupyter notebook
# uses.
# Default: {}
# c.NotebookApp.tornado_settings = {}

## Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headers sent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
# Default: False
# c.NotebookApp.trust_xheaders = False

## Disable launching browser by redirect file
#
# For versions of notebook > 5.7.2, a security feature measure was added that
# prevented the authentication token used to launch the browser from being visible.
# This feature makes it difficult for other users on a multi-user system from
# running code in your Jupyter session as you.
#
# However, some environments (like Windows Subsystem for Linux (WSL) and Chromebooks),
# launching a browser using a redirect file can lead the browser failing to load.
# This is because of the difference in file structures/paths between the runtime and
# the browser.
#
# Disabling this setting to False will disable this behavior, allowing the browser
# to launch by using a URL and visible token (as before).
# Default: True
# c.NotebookApp.use_redirect_file = True

## DEPRECATED, use tornado_settings
# Default: {}
# c.NotebookApp.webapp_settings = {}

## Specify Where to open the notebook on startup. This is the
# `new` argument passed to the standard library method `webbrowser.open`.
# The behaviour is not guaranteed, but depends on browser support. Valid
# values are:
#
# - 2 opens a new tab,
# - 1 opens a new window,
# - 0 opens in an existing window.
#
# See the `webbrowser.open` documentation for details.
# Default: 2
# c.NotebookApp.webbrowser_open_new = 2

## Set the tornado compression options for websocket connections.
#
# This value will be returned from
# :meth:`WebSocketHandler.get_compression_options`. None (default) will disable
# compression. A dict (even an empty one) will enable compression.
#
# See the tornado docs for WebSocketHandler.get_compression_options for details.
# Default: None
# c.NotebookApp.websocket_compression_options = None

## The base URL for websockets,
# if it differs from the HTTP server (hint: it almost certainly doesn't).
#
# Should be in the form of an HTTP origin: ws[s]://hostname[:port]
# Default: ''
# c.NotebookApp.websocket_url = ''

#------------------------------------------------------------------------------
# ConnectionFileMixin(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Mixin for configurable classes that work with connection files

## JSON file in which to store connection info [default: kernel-<pid>.json]
#
# This file will contain the IP, ports, and authentication key needed to connect
# clients to this kernel. By default, this file will be created in the security dir
# of the current profile, but can be specified by absolute path.
# Default: ''
# c.ConnectionFileMixin.connection_file = ''

## set the control (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.control_port = 0

## set the heartbeat port [default: random]
# Default: 0
# c.ConnectionFileMixin.hb_port = 0

## set the iopub (PUB) port [default: random]
# Default: 0
# c.ConnectionFileMixin.iopub_port = 0

## Set the kernel's IP address [default localhost].
# If the IP address is something other than localhost, then
# Consoles on other machines will be able to connect
# to the Kernel, so be careful!
# Default: ''
# c.ConnectionFileMixin.ip = ''

## set the shell (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.shell_port = 0

## set the stdin (ROUTER) port [default: random]
# Default: 0
# c.ConnectionFileMixin.stdin_port = 0

# Choices: any of ['tcp', 'ipc'] (case-insensitive)
# Default: 'tcp'
# c.ConnectionFileMixin.transport = 'tcp'

#------------------------------------------------------------------------------
# KernelManager(ConnectionFileMixin) configuration
#------------------------------------------------------------------------------
## Manages a single kernel in a subprocess on this host.
#
# This version starts kernels with Popen.

## Should we autorestart the kernel if it dies.
# Default: True
# c.KernelManager.autorestart = True

## JSON file in which to store connection info [default: kernel-<pid>.json]
# See also: ConnectionFileMixin.connection_file
# c.KernelManager.connection_file = ''

## set the control (ROUTER) port [default: random]
# See also: ConnectionFileMixin.control_port
# c.KernelManager.control_port = 0

## set the heartbeat port [default: random]
# See also: ConnectionFileMixin.hb_port
# c.KernelManager.hb_port = 0

## set the iopub (PUB) port [default: random]
# See also: ConnectionFileMixin.iopub_port
# c.KernelManager.iopub_port = 0

## Set the kernel's IP address [default localhost].
# See also: ConnectionFileMixin.ip
# c.KernelManager.ip = ''

## set the shell (ROUTER) port [default: random]
# See also: ConnectionFileMixin.shell_port
# c.KernelManager.shell_port = 0

## Time to wait for a kernel to terminate before killing it, in seconds. When a
# shutdown request is initiated, the kernel will be immediately sent an
# interrupt (SIGINT), followedby a shutdown_request message, after 1/2 of
# `shutdown_wait_time`it will be sent a terminate (SIGTERM) request, and finally
# at the end of `shutdown_wait_time` will be killed (SIGKILL). terminate and
# kill may be equivalent on windows. Note that this value can beoverridden by
# the in-use kernel provisioner since shutdown times mayvary by provisioned
# environment.
# Default: 5.0
# c.KernelManager.shutdown_wait_time = 5.0

## set the stdin (ROUTER) port [default: random]
# See also: ConnectionFileMixin.stdin_port
# c.KernelManager.stdin_port = 0

# See also: ConnectionFileMixin.transport
# c.KernelManager.transport = 'tcp'

#------------------------------------------------------------------------------
# Session(Configurable) configuration
#------------------------------------------------------------------------------
## Object for handling serialization and sending of messages.
#
# The Session object handles building messages and sending them
# with ZMQ sockets or ZMQStream objects. Objects can communicate with each
# other over the network via Session objects, and only need to work with the
# dict-based IPython message spec. The Session will handle
# serialization/deserialization, security, and metadata.
#
# Sessions support configurable serialization via packer/unpacker traits,
# and signing with HMAC digests via the key/keyfile traits.
#
# Parameters
# ----------
#
# debug : bool
# whether to trigger extra debugging statements
# packer/unpacker : str : 'json', 'pickle' or import_string
# importstrings for methods to serialize message parts. If just
# 'json' or 'pickle', predefined JSON and pickle packers will be used.
# Otherwise, the entire importstring must be used.
#
# The functions must accept at least valid JSON input, and output
# *bytes*.
#
# For example, to use msgpack:
# packer = 'msgpack.packb', unpacker='msgpack.unpackb'
# pack/unpack : callables
# You can also set the pack/unpack callables for serialization directly.
# session : bytes
# the ID of this Session object. The default is to generate a new UUID.
# username : unicode
# username added to message headers. The default is to ask the OS.
# key : bytes
# The key used to initialize an HMAC signature. If unset, messages
# will not be signed or checked.
# keyfile : filepath
# The file containing a key. If this is set, `key` will be initialized
# to the contents of the file.

## Threshold (in bytes) beyond which an object's buffer should be extracted to
# avoid pickling.
# Default: 1024
# c.Session.buffer_threshold = 1024

## Whether to check PID to protect against calls after fork.
#
# This check can be disabled if fork-safety is handled elsewhere.
# Default: True
# c.Session.check_pid = True

## Threshold (in bytes) beyond which a buffer should be sent without copying.
# Default: 65536
# c.Session.copy_threshold = 65536

## Debug output in the Session
# Default: False
# c.Session.debug = False

## The maximum number of digests to remember.
#
# The digest history will be culled when it exceeds this value.
# Default: 65536
# c.Session.digest_history_size = 65536

## The maximum number of items for a container to be introspected for custom serialization.
# Containers larger than this are pickled outright.
# Default: 64
# c.Session.item_threshold = 64

## execution key, for signing messages.
# Default: b''
# c.Session.key = b''

## path to file containing execution key.
# Default: ''
# c.Session.keyfile = ''

## Metadata dictionary, which serves as the default top-level metadata dict for
# each message.
# Default: {}
# c.Session.metadata = {}

## The name of the packer for serializing messages.
# Should be one of 'json', 'pickle', or an import name
# for a custom callable serializer.
# Default: 'json'
# c.Session.packer = 'json'

## The UUID identifying this session.
# Default: ''
# c.Session.session = ''

## The digest scheme used to construct the message signatures.
# Must have the form 'hmac-HASH'.
# Default: 'hmac-sha256'
# c.Session.signature_scheme = 'hmac-sha256'

## The name of the unpacker for unserializing messages.
# Only used with custom functions for `packer`.
# Default: 'json'
# c.Session.unpacker = 'json'

## Username for the Session. Default is your system username.
# Default: 'luyanfeng'
# c.Session.username = 'luyanfeng'

#------------------------------------------------------------------------------
# MultiKernelManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## A class for managing multiple kernels.

## The name of the default kernel to start
# Default: 'python3'
# c.MultiKernelManager.default_kernel_name = 'python3'

## The kernel manager class. This is configurable to allow
# subclassing of the KernelManager for customized behavior.
# Default: 'jupyter_client.ioloop.IOLoopKernelManager'
# c.MultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager'

## Share a single zmq.Context to talk to all my kernels
# Default: True
# c.MultiKernelManager.shared_context = True

#------------------------------------------------------------------------------
# MappingKernelManager(MultiKernelManager) configuration
#------------------------------------------------------------------------------
## A KernelManager that handles notebook mapping and HTTP error handling

## White list of allowed kernel message types.
# When the list is empty, all message types are allowed.
# Default: []
# c.MappingKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be buffered in-memory.
# When True (default), messages are buffered and replayed on reconnect,
# avoiding lost messages due to interrupted connectivity.
# Disable if long-running kernels will produce too much output while
# no frontends are connected.
# Default: True
# c.MappingKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# Only effective if cull_idle_timeout > 0.
# Default: False
# c.MappingKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# Only effective if cull_idle_timeout > 0.
# Default: False
# c.MappingKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be culled.
# Values of 0 or lower disable culling. Very short timeouts may result in kernels being culled
# for users with poor network connections.
# Default: 0
# c.MappingKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# Default: 300
# c.MappingKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.MappingKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# On starting and restarting kernels, we check whether the
# kernel is running and responsive by sending kernel_info_requests.
# This sets the timeout in seconds for how long the kernel can take
# before being presumed dead.
# This affects the MappingKernelManager (which handles kernel restarts)
# and the ZMQChannelsHandler (which handles the startup).
# Default: 60
# c.MappingKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: MultiKernelManager.kernel_manager_class
# c.MappingKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager'

# Default: ''
# c.MappingKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.MappingKernelManager.shared_context = True

#------------------------------------------------------------------------------
# KernelSpecManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## List of allowed kernel names.
#
# By default, all installed kernels are allowed.
# Default: set()
# c.KernelSpecManager.allowed_kernelspecs = set()

## If there is no Python kernelspec registered and the IPython
# kernel is available, ensure it is added to the spec list.
# Default: True
# c.KernelSpecManager.ensure_native_kernel = True

## The kernel spec class. This is configurable to allow
# subclassing of the KernelSpecManager for customized behavior.
# Default: 'jupyter_client.kernelspec.KernelSpec'
# c.KernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec'

## Deprecated, use `KernelSpecManager.allowed_kernelspecs`
# Default: set()
# c.KernelSpecManager.whitelist = set()

#------------------------------------------------------------------------------
# ContentsManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Base class for serving files and directories.
#
# This serves any text or binary file,
# as well as directories,
# with special handling for JSON notebook documents.
#
# Most APIs take a path argument,
# which is always an API-style unicode path,
# and always refers to a directory.
#
# - unicode, not url-escaped
# - '/'-separated
# - leading and trailing '/' will be stripped
# - if unspecified, path defaults to '',
# indicating the root path.

## Allow access to hidden files
# Default: False
# c.ContentsManager.allow_hidden = False

# Default: None
# c.ContentsManager.checkpoints = None

# Default: 'notebook.services.contents.checkpoints.Checkpoints'
# c.ContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints'

# Default: {}
# c.ContentsManager.checkpoints_kwargs = {}

## handler class to use when serving raw file requests.
#
# Default is a fallback that talks to the ContentsManager API,
# which may be inefficient, especially for large files.
#
# Local files-based ContentsManagers can use a StaticFileHandler subclass,
# which will be much more efficient.
#
# Access to these files should be Authenticated.
# Default: 'notebook.files.handlers.FilesHandler'
# c.ContentsManager.files_handler_class = 'notebook.files.handlers.FilesHandler'

## Extra parameters to pass to files_handler_class.
#
# For example, StaticFileHandlers generally expect a `path` argument
# specifying the root directory from which to serve files.
# Default: {}
# c.ContentsManager.files_handler_params = {}

## Glob patterns to hide in file and directory listings.
# Default: ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']
# c.ContentsManager.hide_globs = ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']

## Python callable or importstring thereof
#
# To be called on a contents model prior to save.
#
# This can be used to process the structure,
# such as removing notebook outputs or other side effects that
# should not be saved.
#
# It will be called as (all arguments passed by keyword)::
#
# hook(path=path, model=model, contents_manager=self)
#
# - model: the model to be saved. Includes file contents.
# Modifying this dict will affect the file that is stored.
# - path: the API path of the save destination
# - contents_manager: this ContentsManager instance
# Default: None
# c.ContentsManager.pre_save_hook = None

# Default: '/'
# c.ContentsManager.root_dir = '/'

## The base name used when creating untitled directories.
# Default: 'Untitled Folder'
# c.ContentsManager.untitled_directory = 'Untitled Folder'

## The base name used when creating untitled files.
# Default: 'untitled'
# c.ContentsManager.untitled_file = 'untitled'

## The base name used when creating untitled notebooks.
# Default: 'Untitled'
# c.ContentsManager.untitled_notebook = 'Untitled'

#------------------------------------------------------------------------------
# FileManagerMixin(Configurable) configuration
#------------------------------------------------------------------------------
## Mixin for ContentsAPI classes that interact with the filesystem.
#
# Provides facilities for reading, writing, and copying both notebooks and
# generic files.
#
# Shared by FileContentsManager and FileCheckpoints.
#
# Note ---- Classes using this mixin must provide the following attributes:
#
# root_dir : unicode
# A directory against which API-style paths are to be resolved.
#
# log : logging.Logger

## By default notebooks are saved on disk on a temporary file and then if successfully written, it replaces the old ones.
# This procedure, namely 'atomic_writing', causes some bugs on file system without operation order enforcement (like some networked fs).
# If set to False, the new notebook is written directly on the old one which could fail (eg: full filesystem or quota )
# Default: True
# c.FileManagerMixin.use_atomic_writing = True

#------------------------------------------------------------------------------
# FileContentsManager(FileManagerMixin, ContentsManager) configuration
#------------------------------------------------------------------------------
## Allow access to hidden files
# See also: ContentsManager.allow_hidden
# c.FileContentsManager.allow_hidden = False

# See also: ContentsManager.checkpoints
# c.FileContentsManager.checkpoints = None

# See also: ContentsManager.checkpoints_class
# c.FileContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints'

# See also: ContentsManager.checkpoints_kwargs
# c.FileContentsManager.checkpoints_kwargs = {}

## If True (default), deleting files will send them to the
# platform's trash/recycle bin, where they can be recovered. If False,
# deleting files really deletes them.
# Default: True
# c.FileContentsManager.delete_to_trash = True

## handler class to use when serving raw file requests.
# See also: ContentsManager.files_handler_class
# c.FileContentsManager.files_handler_class = 'notebook.files.handlers.FilesHandler'

## Extra parameters to pass to files_handler_class.
# See also: ContentsManager.files_handler_params
# c.FileContentsManager.files_handler_params = {}

##
# See also: ContentsManager.hide_globs
# c.FileContentsManager.hide_globs = ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~']

## Python callable or importstring thereof
#
# to be called on the path of a file just saved.
#
# This can be used to process the file on disk,
# such as converting the notebook to a script or HTML via nbconvert.
#
# It will be called as (all arguments passed by keyword)::
#
# hook(os_path=os_path, model=model, contents_manager=instance)
#
# - path: the filesystem path to the file just written
# - model: the model representing the file
# - contents_manager: this ContentsManager instance
# Default: None
# c.FileContentsManager.post_save_hook = None

## Python callable or importstring thereof
# See also: ContentsManager.pre_save_hook
# c.FileContentsManager.pre_save_hook = None

# Default: ''
# c.FileContentsManager.root_dir = ''

## DEPRECATED, use post_save_hook. Will be removed in Notebook 5.0
# Default: False
# c.FileContentsManager.save_script = False

## The base name used when creating untitled directories.
# See also: ContentsManager.untitled_directory
# c.FileContentsManager.untitled_directory = 'Untitled Folder'

## The base name used when creating untitled files.
# See also: ContentsManager.untitled_file
# c.FileContentsManager.untitled_file = 'untitled'

## The base name used when creating untitled notebooks.
# See also: ContentsManager.untitled_notebook
# c.FileContentsManager.untitled_notebook = 'Untitled'

## By default notebooks are saved on disk on a temporary file and then if
# successfully written, it replaces the old ones.
# See also: FileManagerMixin.use_atomic_writing
# c.FileContentsManager.use_atomic_writing = True

#------------------------------------------------------------------------------
# NotebookNotary(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## A class for computing and verifying notebook signatures.

## The hashing algorithm used to sign notebooks.
# Choices: any of ['sha256', 'sha3_224', 'sha384', 'md5', 'sha3_256', 'sha3_512', 'sha1', 'sha224', 'blake2s', 'sha3_384', 'sha512', 'blake2b']
# Default: 'sha256'
# c.NotebookNotary.algorithm = 'sha256'

## The storage directory for notary secret and database.
# Default: ''
# c.NotebookNotary.data_dir = ''

## The sqlite file in which to store notebook signatures.
# By default, this will be in your Jupyter data directory.
# You can set it to ':memory:' to disable sqlite writing to the filesystem.
# Default: ''
# c.NotebookNotary.db_file = ''

## The secret key with which notebooks are signed.
# Default: b''
# c.NotebookNotary.secret = b''

## The file where the secret key is stored.
# Default: ''
# c.NotebookNotary.secret_file = ''

## A callable returning the storage backend for notebook signatures.
# The default uses an SQLite database.
# Default: traitlets.Undefined
# c.NotebookNotary.store_factory = traitlets.Undefined

#------------------------------------------------------------------------------
# AsyncMultiKernelManager(MultiKernelManager) configuration
#------------------------------------------------------------------------------
## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.AsyncMultiKernelManager.default_kernel_name = 'python3'

## The kernel manager class. This is configurable to allow
# subclassing of the AsyncKernelManager for customized behavior.
# Default: 'jupyter_client.ioloop.AsyncIOLoopKernelManager'
# c.AsyncMultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.AsyncMultiKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# kernel has a `.ready` future which can be awaited before connecting
# Default: False
# c.AsyncMultiKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# AsyncMappingKernelManager(MappingKernelManager, AsyncMultiKernelManager) configuration
#------------------------------------------------------------------------------
## White list of allowed kernel message types.
# See also: MappingKernelManager.allowed_message_types
# c.AsyncMappingKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be
# buffered in-memory.
# See also: MappingKernelManager.buffer_offline_messages
# c.AsyncMappingKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# See also: MappingKernelManager.cull_busy
# c.AsyncMappingKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# See also: MappingKernelManager.cull_connected
# c.AsyncMappingKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be
# culled.
# See also: MappingKernelManager.cull_idle_timeout
# c.AsyncMappingKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# See also: MappingKernelManager.cull_interval
# c.AsyncMappingKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.AsyncMappingKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# See also: MappingKernelManager.kernel_info_timeout
# c.AsyncMappingKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: AsyncMultiKernelManager.kernel_manager_class
# c.AsyncMappingKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

# See also: MappingKernelManager.root_dir
# c.AsyncMappingKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.AsyncMappingKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# See also: AsyncMultiKernelManager.use_pending_kernels
# c.AsyncMappingKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# GatewayKernelManager(AsyncMappingKernelManager) configuration
#------------------------------------------------------------------------------
## Kernel manager that supports remote kernels hosted by Jupyter Kernel or
# Enterprise Gateway.

## White list of allowed kernel message types.
# See also: MappingKernelManager.allowed_message_types
# c.GatewayKernelManager.allowed_message_types = []

## Whether messages from kernels whose frontends have disconnected should be
# buffered in-memory.
# See also: MappingKernelManager.buffer_offline_messages
# c.GatewayKernelManager.buffer_offline_messages = True

## Whether to consider culling kernels which are busy.
# See also: MappingKernelManager.cull_busy
# c.GatewayKernelManager.cull_busy = False

## Whether to consider culling kernels which have one or more connections.
# See also: MappingKernelManager.cull_connected
# c.GatewayKernelManager.cull_connected = False

## Timeout (in seconds) after which a kernel is considered idle and ready to be
# culled.
# See also: MappingKernelManager.cull_idle_timeout
# c.GatewayKernelManager.cull_idle_timeout = 0

## The interval (in seconds) on which to check for idle kernels exceeding the
# cull timeout value.
# See also: MappingKernelManager.cull_interval
# c.GatewayKernelManager.cull_interval = 300

## The name of the default kernel to start
# See also: MultiKernelManager.default_kernel_name
# c.GatewayKernelManager.default_kernel_name = 'python3'

## Timeout for giving up on a kernel (in seconds).
# See also: MappingKernelManager.kernel_info_timeout
# c.GatewayKernelManager.kernel_info_timeout = 60

## The kernel manager class. This is configurable to allow
# See also: AsyncMultiKernelManager.kernel_manager_class
# c.GatewayKernelManager.kernel_manager_class = 'jupyter_client.ioloop.AsyncIOLoopKernelManager'

# See also: MappingKernelManager.root_dir
# c.GatewayKernelManager.root_dir = ''

## Share a single zmq.Context to talk to all my kernels
# See also: MultiKernelManager.shared_context
# c.GatewayKernelManager.shared_context = True

## Whether to make kernels available before the process has started. The
# See also: AsyncMultiKernelManager.use_pending_kernels
# c.GatewayKernelManager.use_pending_kernels = False

#------------------------------------------------------------------------------
# GatewayKernelSpecManager(KernelSpecManager) configuration
#------------------------------------------------------------------------------
## List of allowed kernel names.
# See also: KernelSpecManager.allowed_kernelspecs
# c.GatewayKernelSpecManager.allowed_kernelspecs = set()

## If there is no Python kernelspec registered and the IPython
# See also: KernelSpecManager.ensure_native_kernel
# c.GatewayKernelSpecManager.ensure_native_kernel = True

## The kernel spec class. This is configurable to allow
# See also: KernelSpecManager.kernel_spec_class
# c.GatewayKernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec'

## Deprecated, use `KernelSpecManager.allowed_kernelspecs`
# See also: KernelSpecManager.whitelist
# c.GatewayKernelSpecManager.whitelist = set()

#------------------------------------------------------------------------------
# GatewayClient(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This class manages the configuration. It's its own singleton class so that we
# can share these values across all objects. It also contains some helper methods
# to build request arguments out of the various config options.

## The authorization token used in the HTTP headers. (JUPYTER_GATEWAY_AUTH_TOKEN
# env var)
# Default: None
# c.GatewayClient.auth_token = None

## The filename of CA certificates or None to use defaults.
# (JUPYTER_GATEWAY_CA_CERTS env var)
# Default: None
# c.GatewayClient.ca_certs = None

## The filename for client SSL certificate, if any. (JUPYTER_GATEWAY_CLIENT_CERT
# env var)
# Default: None
# c.GatewayClient.client_cert = None

## The filename for client SSL key, if any. (JUPYTER_GATEWAY_CLIENT_KEY env var)
# Default: None
# c.GatewayClient.client_key = None

## The time allowed for HTTP connection establishment with the Gateway server.
# (JUPYTER_GATEWAY_CONNECT_TIMEOUT env var)
# Default: 40.0
# c.GatewayClient.connect_timeout = 40.0

## A comma-separated list of environment variable names that will be included, along with
# their values, in the kernel startup request. The corresponding `env_whitelist` configuration
# value must also be set on the Gateway server - since that configuration value indicates which
# environmental values to make available to the kernel. (JUPYTER_GATEWAY_ENV_WHITELIST env var)
# Default: ''
# c.GatewayClient.env_whitelist = ''

## The time allowed for HTTP reconnection with the Gateway server for the first time.
# Next will be JUPYTER_GATEWAY_RETRY_INTERVAL multiplied by two in factor of numbers of retries
# but less than JUPYTER_GATEWAY_RETRY_INTERVAL_MAX.
# (JUPYTER_GATEWAY_RETRY_INTERVAL env var)
# Default: 1.0
# c.GatewayClient.gateway_retry_interval = 1.0

## The maximum time allowed for HTTP reconnection retry with the Gateway server.
# (JUPYTER_GATEWAY_RETRY_INTERVAL_MAX env var)
# Default: 30.0
# c.GatewayClient.gateway_retry_interval_max = 30.0

## The maximum retries allowed for HTTP reconnection with the Gateway server.
# (JUPYTER_GATEWAY_RETRY_MAX env var)
# Default: 5
# c.GatewayClient.gateway_retry_max = 5

## Additional HTTP headers to pass on the request. This value will be converted to a dict.
# (JUPYTER_GATEWAY_HEADERS env var)
# Default: '{}'
# c.GatewayClient.headers = '{}'

## The password for HTTP authentication. (JUPYTER_GATEWAY_HTTP_PWD env var)
# Default: None
# c.GatewayClient.http_pwd = None

## The username for HTTP authentication. (JUPYTER_GATEWAY_HTTP_USER env var)
# Default: None
# c.GatewayClient.http_user = None

## The gateway API endpoint for accessing kernel resources
# (JUPYTER_GATEWAY_KERNELS_ENDPOINT env var)
# Default: '/api/kernels'
# c.GatewayClient.kernels_endpoint = '/api/kernels'

## The gateway API endpoint for accessing kernelspecs
# (JUPYTER_GATEWAY_KERNELSPECS_ENDPOINT env var)
# Default: '/api/kernelspecs'
# c.GatewayClient.kernelspecs_endpoint = '/api/kernelspecs'

## The gateway endpoint for accessing kernelspecs resources
# (JUPYTER_GATEWAY_KERNELSPECS_RESOURCE_ENDPOINT env var)
# Default: '/kernelspecs'
# c.GatewayClient.kernelspecs_resource_endpoint = '/kernelspecs'

## The time allowed for HTTP request completion. (JUPYTER_GATEWAY_REQUEST_TIMEOUT
# env var)
# Default: 40.0
# c.GatewayClient.request_timeout = 40.0

## The url of the Kernel or Enterprise Gateway server where
# kernel specifications are defined and kernel management takes place.
# If defined, this Notebook server acts as a proxy for all kernel
# management and kernel specification retrieval. (JUPYTER_GATEWAY_URL env var)
# Default: None
# c.GatewayClient.url = None

## For HTTPS requests, determines if server's certificate should be validated or not.
# (JUPYTER_GATEWAY_VALIDATE_CERT env var)
# Default: True
# c.GatewayClient.validate_cert = True

## The websocket url of the Kernel or Enterprise Gateway server. If not provided, this value
# will correspond to the value of the Gateway url with 'ws' in place of 'http'. (JUPYTER_GATEWAY_WS_URL env var)
# Default: None
# c.GatewayClient.ws_url = None

#------------------------------------------------------------------------------
# TerminalManager(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
##

## Timeout (in seconds) in which a terminal has been inactive and ready to be culled.
# Values of 0 or lower disable culling.
# Default: 0
# c.TerminalManager.cull_inactive_timeout = 0

## The interval (in seconds) on which to check for terminals exceeding the
# inactive timeout value.
# Default: 300
# c.TerminalManager.cull_interval = 300
(pytorch-tutorials) luyanfeng@amax:~$
  1. 由于我是通过 ssh 连接服务器,并在服务器上运行代码的,所以要想在本地的浏览器访问服务器上的 jupyter notebook 服务,需要指定服务器 IP 地址。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
(pytorch-tutorials) luyanfeng@amax:~$ jupyter notebook --help
The Jupyter HTML Notebook.

This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.

Subcommands
===========
Subcommands are launched as `jupyter-notebook cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter-notebook cmd -h`.

list
List currently running notebook servers.
stop
Stop currently running notebook server.
password
Set a password for the notebook server.

Options
=======
The options below are convenience aliases to configurable class-options,
as listed in the "Equivalent to" description-line of the aliases.
To see all configurable class-options for some <cmd>, use:
<cmd> --help-all

--debug
set log level to logging.DEBUG (maximize logging output)
Equivalent to: [--Application.log_level=10]
--show-config
Show the application's configuration (human-readable format)
Equivalent to: [--Application.show_config=True]
--show-config-json
Show the application's configuration (json format)
Equivalent to: [--Application.show_config_json=True]
--generate-config
generate default config file
Equivalent to: [--JupyterApp.generate_config=True]
-y
Answer yes to any questions instead of prompting.
Equivalent to: [--JupyterApp.answer_yes=True]
--no-browser
Don't open the notebook in a browser after startup.
Equivalent to: [--NotebookApp.open_browser=False]
--pylab
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
Equivalent to: [--NotebookApp.pylab=warn]
--no-mathjax
Disable MathJax

MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
very large, so you may want to disable it if you have a slow internet
connection, or for offline use of the notebook.

When disabled, equations etc. will appear as their untransformed TeX source.
Equivalent to: [--NotebookApp.enable_mathjax=False]
--allow-root
Allow the notebook to be run from root user.
Equivalent to: [--NotebookApp.allow_root=True]
--autoreload
Autoreload the webapp

Enable reloading of the tornado webapp and all imported Python packages
when any changes are made to any Python src files in Notebook or
extensions.
Equivalent to: [--NotebookApp.autoreload=True]
--script
DEPRECATED, IGNORED
Equivalent to: [--FileContentsManager.save_script=True]
--no-script
DEPRECATED, IGNORED
Equivalent to: [--FileContentsManager.save_script=False]
--log-level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
Equivalent to: [--Application.log_level]
--config=<Unicode>
Full path of a config file.
Default: ''
Equivalent to: [--JupyterApp.config_file]
--ip=<Unicode>
The IP address the notebook server will listen on.
Default: 'localhost'
Equivalent to: [--NotebookApp.ip]
--port=<Int>
The port the notebook server will listen on (env: JUPYTER_PORT).
Default: 8888
Equivalent to: [--NotebookApp.port]
--port-retries=<Int>
The number of additional ports to try if the specified port is not available
(env: JUPYTER_PORT_RETRIES).
Default: 50
Equivalent to: [--NotebookApp.port_retries]
--sock=<Unicode>
The UNIX socket the notebook server will listen on.
Default: ''
Equivalent to: [--NotebookApp.sock]
--sock-mode=<Unicode>
The permissions mode for UNIX socket creation (default: 0600).
Default: '0600'
Equivalent to: [--NotebookApp.sock_mode]
--transport=<CaselessStrEnum>
Choices: any of ['tcp', 'ipc'] (case-insensitive)
Default: 'tcp'
Equivalent to: [--KernelManager.transport]
--keyfile=<Unicode>
The full path to a private key file for usage with SSL/TLS.
Default: ''
Equivalent to: [--NotebookApp.keyfile]
--certfile=<Unicode>
The full path to an SSL/TLS certificate file.
Default: ''
Equivalent to: [--NotebookApp.certfile]
--client-ca=<Unicode>
The full path to a certificate authority certificate for SSL/TLS client
authentication.
Default: ''
Equivalent to: [--NotebookApp.client_ca]
--notebook-dir=<Unicode>
The directory to use for notebooks and kernels.
Default: ''
Equivalent to: [--NotebookApp.notebook_dir]
--browser=<Unicode>
Specify what command to use to invoke a web
browser when opening the notebook. If not specified, the
default browser will be determined by the `webbrowser`
standard library module, which allows setting of the
BROWSER environment variable to override it.
Default: ''
Equivalent to: [--NotebookApp.browser]
--pylab=<Unicode>
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
Default: 'disabled'
Equivalent to: [--NotebookApp.pylab]
--gateway-url=<Unicode>
The url of the Kernel or Enterprise Gateway server where
kernel specifications are defined and kernel management takes place.
If defined, this Notebook server acts as a proxy for all kernel
management and kernel specification retrieval. (JUPYTER_GATEWAY_URL env var)
Default: None
Equivalent to: [--GatewayClient.url]

Examples
--------

jupyter notebook # start the notebook
jupyter notebook --certfile=mycert.pem # use SSL/TLS certificate
jupyter notebook password # enter a password to protect the server

To see all available configurables, use `--help-all`.

(pytorch-tutorials) luyanfeng@amax:~$ jupyter notebook --ip=10.4.6.15
[I 20:25:48.389 NotebookApp] Serving notebooks from local directory: /home/luyanfeng/my_code/my_github/susu-pytorch-tutorials-notes
[I 20:25:48.390 NotebookApp] Jupyter Notebook 6.4.12 is running at:
[I 20:25:48.390 NotebookApp] http://10.4.6.15:8888/
[I 20:25:48.390 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 20:25:48.393 NotebookApp] No web browser found: could not locate runnable browser.
[I 20:25:57.306 NotebookApp] 302 GET / (10.4.3.151) 0.930000ms

下一步

  1. 官方入门: https://pytorch.org/tutorials/beginner/basics/intro.html .

  2. 工程代码: https://zhuanlan.zhihu.com/p/29024978 .

结语

第三十四篇博文写完,开心!!!!

今天,也是充满希望的一天。