Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
bd689cbb
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd689cbb
编写于
3月 09, 2017
作者:
G
gangliao
提交者:
GitHub
3月 09, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1578 from gangliao/book
Add Book in Docker
上级
5914c5c7
b4792a3c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
14 deletion
+34
-14
doc/getstarted/build_and_install/docker_install_en.rst
doc/getstarted/build_and_install/docker_install_en.rst
+24
-1
paddle/scripts/docker/Dockerfile
paddle/scripts/docker/Dockerfile
+3
-3
paddle/scripts/docker/Dockerfile.gpu
paddle/scripts/docker/Dockerfile.gpu
+3
-3
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+2
-1
paddle/scripts/docker/entrypoint
paddle/scripts/docker/entrypoint
+2
-6
未找到文件。
doc/getstarted/build_and_install/docker_install_en.rst
浏览文件 @
bd689cbb
...
...
@@ -42,7 +42,7 @@ Windows -- in a consistent way.
.. code-block:: bash
docker run -d -p 2202:22 -v $PWD:/paddle paddle:dev
docker run -d -p 2202:22 -
p 8888:8888 -
v $PWD:/paddle paddle:dev
This runs a container of the development environment Docker image
with the local source tree mounted to :code:`/paddle` of the
...
...
@@ -82,6 +82,29 @@ Windows -- in a consistent way.
cd /paddle/build
ctest
4. Run PaddlePaddle Book under Docker Container
The Jupyter Notebook is an open-source web application that allows
you to create and share documents that contain live code, equations,
visualizations and explanatory text in a single browser.
PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.
We already exposed port 8888 for this book. If you want to
dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.
Once you are inside the container, simply issue the command:
.. code-block:: bash
jupyter notebook
Then, you would back and paste the address into the local browser:
.. code-block:: text
http://localhost:8888/
That's all. Enjoy your journey!
CPU-only and GPU Images
-----------------------
...
...
paddle/scripts/docker/Dockerfile
浏览文件 @
bd689cbb
...
...
@@ -50,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
cd
..
&&
rm
-rf
cmake-3.4.1
COPY
. /paddle/
RUN
cd
/paddle/
&&
git submodule update
--init
--recursive
RUN
/paddle/paddle/scripts/docker/build.sh
VOLUME
["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"]
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
...
...
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN
sed
-ri
's/UsePAM yes/#UsePAM yes/g'
/etc/ssh/sshd_config
EXPOSE
22
# Jupyter Notebook directory.
RUN
mkdir
/notes/
WORKDIR
"/notes"
# Jupyter Notebook: Paddle book
EXPOSE
8888
COPY
./paddle/scripts/docker/entrypoint /opt/bin/
...
...
paddle/scripts/docker/Dockerfile.gpu
浏览文件 @
bd689cbb
...
...
@@ -50,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
cd .. && rm -rf cmake-3.4.1
COPY . /paddle/
RUN cd /paddle/ && git submodule update --init --recursive
RUN /paddle/paddle/scripts/docker/build.sh
VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"]
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
...
...
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22
# Jupyter Notebook directory.
RUN mkdir /notes/
WORKDIR "/notes"
# Jupyter Notebook: Paddle book
EXPOSE 8888
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
...
...
paddle/scripts/docker/build.sh
浏览文件 @
bd689cbb
...
...
@@ -17,7 +17,8 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
fi
mkdir
-p
/paddle/build
# -p means no error if exists
cd
/paddle/build
# clean local cmake and third_party cache
cd
/paddle/build
&&
rm
-rf
*
&&
rm
-rf
../third_party
cmake ..
\
-DWITH_DOC
=
${
WITH_DOC
:-
OFF
}
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
...
...
paddle/scripts/docker/entrypoint
浏览文件 @
bd689cbb
#!/bin/bash
LOG
=
/var/log/all
touch
$LOG
/usr/sbin/sshd
-D
>>
$LOG
&
jupyter notebook
--ip
=
0.0.0.0 /notes/
>>
$LOG
&
tail
-f
$LOG
/usr/sbin/sshd
-D
&
jupyter notebook
--ip
=
0.0.0.0 /paddle/book/
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录