提交 a7d2d278 编写于 作者: G gongweibao

fix bugs

上级 2cad087e
......@@ -6,7 +6,7 @@ cd $cur_path/../
.tools/convert-markdown-into-ipynb-and-test.sh
paddle_tag=0.10.0rc2
latest_tag=latest
book_tag=latest
#generate docker file
if [ ${USE_UBUNTU_REPO_MIRROR} ]; then
......@@ -15,14 +15,18 @@ else
update_mirror_cmd="\\"
fi
mkdir -p build
#build docker image
echo "paddle_tag:"$paddle_tag
echo "book_tag:"$book_tag
cat > ./build/Dockerfile << EOF
cat > Dockerfile <<EOF
FROM paddlepaddle/paddle:${paddle_tag}
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
COPY . /book
RUN python /book/.tools/cache_dataset.py
RUN pip install -U nltk \
&& python /book/.tools/cache_dataset.py
RUN ${update_mirror_cmd}
apt-get update && \
......@@ -36,6 +40,4 @@ EXPOSE 8888
CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"]
EOF
#build docker image
echo "paddle_tag:"$paddle_tag
echo $dockerfile | docker build --no-cache -t paddlepaddle/book:${paddle_tag} -t paddlepaddle/book:${latest_tag} -f ./build/Dockerfile .
docker build --no-cache -t paddlepaddle/book:${paddle_tag} -t paddlepaddle/book:${book_tag} .
#!/bin/env python
import paddle.v2.dataset as dataset
import ntlk
import nltk
#cifar
dataset.common.download(dataset.cifar.CIFAR100_URL, 'cifar',
dataset.cifar.CIFAR100_MD5)
dataset.common.download(dataset.cifar.CIFAR100_URL, 'cifar',
dataset.cifar.CIFAR100_MD5)
dataset.common.download(dataset.cifar.CIFAR10_URL, 'cifar',
dataset.cifar.CIFAR10_MD5)
dataset.common.download(dataset.cifar.CIFAR10_URL, 'cifar',
dataset.cifar.CIFAR10_MD5)
# Cache conll05
dataset.common.download(dataset.conll05.WORDDICT_URL, 'conll05st', \
......@@ -28,5 +38,5 @@ 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)
dataset.common.download(dataset.wmt14.URL_TRAIN, "wmt14",\
dataset.wmt14.MD5_TRAIN)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册