Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
book
提交
4eac3c33
B
book
项目概览
PaddlePaddle
/
book
通知
16
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
40
列表
看板
标记
里程碑
合并请求
37
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
B
book
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
40
Issue
40
列表
看板
标记
里程碑
合并请求
37
合并请求
37
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4eac3c33
编写于
3月 22, 2017
作者:
G
gongweibao
提交者:
GitHub
3月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request
#3
from Yancey1989/builddockerimage3_yx
Cache paddle dataset
上级
3c9ec464
b5cf5cb9
变更
7
展开全部
显示空白变更内容
内联
并排
Showing
7 changed file
with
51 addition
and
2442 deletion
+51
-2442
.gitignore
.gitignore
+2
-0
.tools/build_docker.sh
.tools/build_docker.sh
+15
-28
.tools/cache_dataset.py
.tools/cache_dataset.py
+32
-0
.tools/convert-markdown-into-ipynb-and-test.sh
.tools/convert-markdown-into-ipynb-and-test.sh
+2
-2
03.image_classification/README.ipynb
03.image_classification/README.ipynb
+0
-877
08.recommender_system/README.en.ipynb
08.recommender_system/README.en.ipynb
+0
-740
08.recommender_system/README.ipynb
08.recommender_system/README.ipynb
+0
-795
未找到文件。
.gitignore
浏览文件 @
4eac3c33
...
@@ -4,3 +4,5 @@ pandoc.template
...
@@ -4,3 +4,5 @@ pandoc.template
.DS_Store
.DS_Store
.idea
.idea
py_env*
py_env*
*.ipynb
build
.tools/build_docker.sh
浏览文件 @
4eac3c33
...
@@ -12,8 +12,8 @@ fi
...
@@ -12,8 +12,8 @@ fi
#convert md to ipynb
#convert md to ipynb
.tools/convert-markdown-into-ipynb-and-test.sh
.tools/convert-markdown-into-ipynb-and-test.sh
paddle_
version
=
0.10.0rc2
paddle_
tag
=
0.10.0rc2
latest_
label
=
latest
latest_
tag
=
latest
#generate docker file
#generate docker file
if
[
${
USE_UBUNTU_REPO_MIRROR
}
]
;
then
if
[
${
USE_UBUNTU_REPO_MIRROR
}
]
;
then
...
@@ -23,38 +23,25 @@ else
...
@@ -23,38 +23,25 @@ else
fi
fi
mkdir
-p
build
mkdir
-p
build
cat
>
build/Dockerfile
<<
EOF1
FROM paddlepaddle/paddle:
${
paddle_version
}
cat
>
./build/Dockerfile
<<
EOF
FROM paddlepaddle/paddle:
${
paddle_tag
}
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
RUN
${
update_mirror_cmd
}
RUN
${
update_mirror_cmd
}
apt-get install locales
apt-get update &&
\
RUN localedef -f UTF-8 -i en_US en_US.UTF-8
apt-get install -y locales &&
\
apt-get -y install gcc &&
\
RUN apt-get -y install gcc &&
\
apt-get -y clean &&
\
apt-get -y clean
localedef -f UTF-8 -i en_US en_US.UTF-8 &&
\
pip install -U matplotlib jupyter numpy requests scipy
RUN pip install -U matplotlib jupyter numpy requests scipy
COPY . /book
COPY . /book
RUN rm -rf /book/build
RUN python /book/.tools/cache_dataset.py
EOF1
if
[
${
COPY_CACHE_DATA
}
]
;
then
cat
>>
build/Dockerfile
<<
EOF2
RUN mkdir -p /root/
${
cache_data_path
}
RUN mv /book/
${
cache_data_path
}
/* /root/
${
cache_data_path
}
/ && rm -rf /book/
${
cache_data_path
}
EOF2
fi
cat
>>
build/Dockerfile
<<
EOF3
EXPOSE 8888
EXPOSE 8888
CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"]
CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"]
EOF
3
EOF
#build docker image
#build docker image
echo
"paddle_
version:"
$paddle_version
echo
"paddle_
tag:"
$paddle_tag
docker build
--no-cache
-t
paddlepaddle/book:
${
paddle_version
}
-t
paddlepaddle/book:
${
latest_label
}
-f
./build/Dockerfile
.
echo
$dockerfile
| docker build
--no-cache
-t
paddlepaddle/book:
${
paddle_tag
}
-t
paddlepaddle/book:
${
latest_tag
}
-f
./build/Dockerfile
.
.tools/cache_dataset.py
0 → 100755
浏览文件 @
4eac3c33
#!/bin/env python
import
paddle.v2.dataset
as
dataset
import
ntlk
# Cache conll05
dataset
.
common
.
download
(
dataset
.
conll05
.
WORDDICT_URL
,
'conll05st'
,
\
dataset
.
conll05
.
WORDDICT_MD5
)
dataset
.
common
.
download
(
dataset
.
conll05
.
VERBDICT_URL
,
'conll05st'
,
\
dataset
.
conll05
.
VERBDICT_MD5
)
dataset
.
common
.
download
(
dataset
.
conll05
.
TRGDICT_URL
,
'conll05st'
,
\
dataset
.
conll05
.
TRGDICT_MD5
)
# Cache imdb
dataset
.
common
.
download
(
dataset
.
imdb
.
URL
,
"imdb"
,
dataset
.
imdb
.
MD5
)
# Cache imikolov
dataset
.
common
.
download
(
dataset
.
imikolov
.
URL
,
"imikolov"
,
dataset
.
imikolov
.
MD5
)
# Cache movielens
dataset
.
common
.
download
(
'http://files.grouplens.org/datasets/movielens/ml-1m.zip'
,
\
'movielens'
,
'c4d9eecfca2ab87c1945afe126590906'
)
# Cache nltk
nltk
.
download
(
'movie_reviews'
,
download_dir
=
dataset
.
common
.
DATA_HOME
)
# Cache uci housing
dataset
.
common
.
download
(
dataset
.
uci_housing
.
URL
,
"uci_housing"
,
\
dataset
.
uci_housing
.
MD5
)
# Cache vmt14
dataset
.
common
.
download
(
dataset
.
vmt14
.
URL_TRAIN
,
"wmt14"
,
\
dataset
.
vmt14
.
MD5_TRAIN
)
.tools/convert-markdown-into-ipynb-and-test.sh
浏览文件 @
4eac3c33
...
@@ -5,14 +5,14 @@ if [ $? -ne 0 ]; then
...
@@ -5,14 +5,14 @@ if [ $? -ne 0 ]; then
exit
1
exit
1
fi
fi
GOPATH
=
~/.cache/go
go get
-u
github.com/wangkuiyi/ipynb/markdown-to-ipynb
export
GOPATH
=
~/go
;
go get
-u
github.com/wangkuiyi/ipynb/markdown-to-ipynb
cur_path
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
-P
)
"
cur_path
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
-P
)
"
cd
$cur_path
/../
cd
$cur_path
/../
#convert md to ipynb
#convert md to ipynb
for
file
in
*
/
{
README,README
\.
en
}
.md
;
do
for
file
in
*
/
{
README,README
\.
en
}
.md
;
do
~/
.cache/
go/bin/markdown-to-ipynb <
$file
>
${
file
%.*
}
".ipynb"
~/go/bin/markdown-to-ipynb <
$file
>
${
file
%.*
}
".ipynb"
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
>
&2
"markdown-to-ipynb
$file
error"
echo
>
&2
"markdown-to-ipynb
$file
error"
exit
1
exit
1
...
...
03.image_classification/README.ipynb
已删除
100644 → 0
浏览文件 @
3c9ec464
此差异已折叠。
点击以展开。
08.recommender_system/README.en.ipynb
已删除
100644 → 0
浏览文件 @
3c9ec464
此差异已折叠。
点击以展开。
08.recommender_system/README.ipynb
已删除
100644 → 0
浏览文件 @
3c9ec464
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录