提交 653c981d 编写于 作者: Y yi.wu

tags for build docker image

上级 1ab419a1
...@@ -5,7 +5,7 @@ MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com> ...@@ -5,7 +5,7 @@ MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_MIRROR ARG UBUNTU_MIRROR
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi' RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
# ENV variables # ENV variables
ARG BUILD_WOBOQ ARG BUILD_WOBOQ
......
...@@ -16,15 +16,19 @@ if [ ${WITH_GPU} == "ON" ]; then ...@@ -16,15 +16,19 @@ if [ ${WITH_GPU} == "ON" ]; then
BASE_IMAGE="nvidia/cuda:7.5-cudnn5-runtime-ubuntu14.04" BASE_IMAGE="nvidia/cuda:7.5-cudnn5-runtime-ubuntu14.04"
if [ ${WITH_AVX} == "ON" ]; then if [ ${WITH_AVX} == "ON" ]; then
DEB_PATH="dist/gpu/" DEB_PATH="dist/gpu/"
DOCKER_SUFFIX="gpu"
else else
DEB_PATH="dist/gpu-noavx/" DEB_PATH="dist/gpu-noavx/"
DOCKER_SUFFIX="gpu-noavx"
fi fi
else else
BASE_IMAGE="python:2.7.13-slim" BASE_IMAGE="python:2.7.13-slim"
if [ ${WITH_AVX} == "ON" ]; then if [ ${WITH_AVX} == "ON" ]; then
DEB_PATH="dist/cpu/" DEB_PATH="dist/cpu/"
DOCKER_SUFFIX=""
else else
DEB_PATH="dist/cpu-noavx/" DEB_PATH="dist/cpu-noavx/"
DOCKER_SUFFIX="noavx"
fi fi
fi fi
# If Dockerfile.* sets BUILD_AND_INSTALL to 'ON', it would have copied # If Dockerfile.* sets BUILD_AND_INSTALL to 'ON', it would have copied
...@@ -95,7 +99,7 @@ else ...@@ -95,7 +99,7 @@ else
MIRROR_UPDATE="\\" MIRROR_UPDATE="\\"
fi fi
cat > /paddle/build/Dockerfile <<EOF cat > /paddle/build/Dockerfile.${DOCKER_SUFFIX} <<EOF
FROM ${BASE_IMAGE} FROM ${BASE_IMAGE}
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册