File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM node:alpine
2
+ RUN npm i docsify-cli -g
3
+ COPY . /data
4
+ WORKDIR /data
5
+ CMD [ "docsify" , "serve" , "docs" ]
Original file line number Diff line number Diff line change @@ -34,6 +34,24 @@ cd Dive-into-DL-PyTorch
34
34
docsify serve docs
35
35
```
36
36
37
+ ### 方法三
38
+ 如果你不想安装` docsify-cli ` 工具,甚至你的电脑上都没有安装` Node.js ` ,而出于某些原因你又想在本地浏览文档,那么你可以在` docker ` 容器中运行网页服务。
39
+
40
+ 首先将本项目clone到本地:
41
+ ``` shell
42
+ git clone https://github.com/ShusenTang/Dive-into-DL-PyTorch.git
43
+ cd Dive-into-DL-PyTorch
44
+ ```
45
+ 之后使用如下命令创建一个名称为「d2dl」的` docker ` 镜像:
46
+ ``` shell
47
+ docker build -t d2dl .
48
+ ```
49
+ 镜像创建好后,运行如下命令创建一个新的容器:
50
+ ``` shell
51
+ docker run -dp 3000:3000 d2dl
52
+ ```
53
+ 最后在浏览器中打开这个地址` http://localhost:3000/#/ ` ,就能愉快地访问文档了。适合那些不想在电脑上装太多工具的小伙伴。
54
+
37
55
38
56
## 目录
39
57
* [ 简介] ( )
You can’t perform that action at this time.
0 commit comments