Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
c043d718
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c043d718
编写于
3月 08, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Book in Docker
上级
00cce876
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
9 deletion
+33
-9
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
+1
-1
未找到文件。
doc/getstarted/build_and_install/docker_install_en.rst
浏览文件 @
c043d718
...
@@ -42,7 +42,7 @@ Windows -- in a consistent way.
...
@@ -42,7 +42,7 @@ Windows -- in a consistent way.
.. code-block:: bash
.. 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
This runs a container of the development environment Docker image
with the local source tree mounted to :code:`/paddle` of the
with the local source tree mounted to :code:`/paddle` of the
...
@@ -82,6 +82,29 @@ Windows -- in a consistent way.
...
@@ -82,6 +82,29 @@ Windows -- in a consistent way.
cd /paddle/build
cd /paddle/build
ctest
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
CPU-only and GPU Images
-----------------------
-----------------------
...
...
paddle/scripts/docker/Dockerfile
浏览文件 @
c043d718
...
@@ -34,6 +34,8 @@ RUN apt-get update && \
...
@@ -34,6 +34,8 @@ RUN apt-get update && \
# git credential to skip password typing
# git credential to skip password typing
RUN
git config
--global
credential.helper store
RUN
git config
--global
credential.helper store
# fetch PaddlePaddle book
RUN
git submodule update
--init
--recursive
# Fix locales to en_US.UTF-8
# Fix locales to en_US.UTF-8
RUN
localedef
-i
en_US
-f
UTF-8 en_US.UTF-8
RUN
localedef
-i
en_US
-f
UTF-8 en_US.UTF-8
...
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
...
@@ -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
RUN
sed
-ri
's/UsePAM yes/#UsePAM yes/g'
/etc/ssh/sshd_config
EXPOSE
22
EXPOSE
22
# Jupyter Notebook directory.
# Jupyter Notebook: Paddle book
RUN
mkdir
/notes/
WORKDIR
"/notes"
EXPOSE
8888
EXPOSE
8888
COPY
./paddle/scripts/docker/entrypoint /opt/bin/
COPY
./paddle/scripts/docker/entrypoint /opt/bin/
...
...
paddle/scripts/docker/Dockerfile.gpu
浏览文件 @
c043d718
...
@@ -34,6 +34,8 @@ RUN apt-get update && \
...
@@ -34,6 +34,8 @@ RUN apt-get update && \
# git credential to skip password typing
# git credential to skip password typing
RUN git config --global credential.helper store
RUN git config --global credential.helper store
# fetch PaddlePaddle book
RUN git submodule update --init --recursive
# Fix locales to en_US.UTF-8
# Fix locales to en_US.UTF-8
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
...
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
...
@@ -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
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22
EXPOSE 22
# Jupyter Notebook directory.
# Jupyter Notebook: Paddle book
RUN mkdir /notes/
WORKDIR "/notes"
EXPOSE 8888
EXPOSE 8888
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
...
...
paddle/scripts/docker/build.sh
浏览文件 @
c043d718
...
@@ -17,7 +17,8 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
...
@@ -17,7 +17,8 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
fi
fi
mkdir
-p
/paddle/build
# -p means no error if exists
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 ..
\
cmake ..
\
-DWITH_DOC
=
${
WITH_DOC
:-
OFF
}
\
-DWITH_DOC
=
${
WITH_DOC
:-
OFF
}
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
...
...
paddle/scripts/docker/entrypoint
浏览文件 @
c043d718
...
@@ -4,5 +4,5 @@ LOG=/var/log/all
...
@@ -4,5 +4,5 @@ LOG=/var/log/all
touch
$LOG
touch
$LOG
/usr/sbin/sshd
-D
>>
$LOG
&
/usr/sbin/sshd
-D
>>
$LOG
&
jupyter notebook
--ip
=
0.0.0.0 /
notes
/
>>
$LOG
&
jupyter notebook
--ip
=
0.0.0.0 /
paddle/book
/
>>
$LOG
&
tail
-f
$LOG
tail
-f
$LOG
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录