-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGPU 服务器端口映射表
53 lines (46 loc) · 1.88 KB
/
GPU 服务器端口映射表
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
## 说明
gpu服务器上9000--9010端口做了内网穿透,公网也可以访问这些端口,必须是http的。如果是TCP映射需要重新做。
### 使用之前注意不要端口用冲突了!冲突了就换其他的端口
### 映射列表
```
http://127.0.0.1:9000 ==> http://9000.gpu.raidcdn.cn:9700
http://127.0.0.1:9001 ==> http://9001.gpu.raidcdn.cn:9700
http://127.0.0.1:9002 ==> http://9002.gpu.raidcdn.cn:9700
http://127.0.0.1:9003 ==> http://9003.gpu.raidcdn.cn:9700
http://127.0.0.1:9004 ==> http://9004.gpu.raidcdn.cn:9700
http://127.0.0.1:9005 ==> http://9005.gpu.raidcdn.cn:9700
http://127.0.0.1:9006 ==> http://9006.gpu.raidcdn.cn:9700
http://127.0.0.1:9007 ==> http://9007.gpu.raidcdn.cn:9700
http://127.0.0.1:9008 ==> http://9008.gpu.raidcdn.cn:9700
http://127.0.0.1:9009 ==> http://9009.gpu.raidcdn.cn:9700
http://127.0.0.1:9010 ==> http://9010.gpu.raidcdn.cn:9700
```
## 例如公网访问9000端口
### 启动jupyter-notebook
```
docker run -d --name="nu_gan_lambda_9000" --runtime=nvidia \
-p 9000:8888 \
-v /opt/lambda_workspace/:/notebooks/lambda_workspace \
tensorflow/tensorflow:1.7.0-gpu-nu_gan jupyter-notebook --ip=0.0.0.0 --port=8888 --allow-root
```
### 查看token
```
$ docker logs -f nu_gan_lambda_9000
。。。
[I 06:03:25.488 NotebookApp] The Jupyter Notebook is running at:
[I 06:03:25.488 NotebookApp] http://0.0.0.0:8888/?token=fa29481482c5ad2fe6a1ccc33760e2024a4ea75da89f11ad
```
### 公网访问
```
http://9000.gpu.raidcdn.cn:9700/?token=fa29481482c5ad2fe6a1ccc33760e2024a4ea75da89f11ad
```
## docker外面使用jupyter启动在9000端口
```
$ cd /opt/
$ nohup jupyter notebook --ip=0.0.0.0 --port=9000 --allow-root > /dev/null 2>&1 &
$ jupyter notebook list
Currently running servers:
http://0.0.0.0:9000/?token=56c42221c777d513b09bc7d86f751c6c4cc53f8dacfddb34 :: /opt
浏览器打开
http://9000.gpu.raidcdn.cn:9700/terminals/1
```