Skip to content

Commit a4e437d

Browse files
authored
Merge pull request #9584 from helinwang/with_fluid
TeamCity build: handle case when WITH_FLUID_ONLY=OFF
2 parents 37d9a72 + 974908f commit a4e437d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

paddle/scripts/docker/build.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ EOF
104104
# make install should also be test when unittest
105105
make install -j `nproc`
106106
pip install /usr/local/opt/paddle/share/wheels/*.whl
107-
paddle version
107+
if [[ ${WITH_FLUID_ONLY:-OFF} == "OFF" ]] ; then
108+
paddle version
109+
fi
108110
fi
109111
}
110112

@@ -183,6 +185,14 @@ EOF
183185
NCCL_DEPS=""
184186
fi
185187

188+
if [[ ${WITH_FLUID_ONLY:-OFF} == "OFF" ]]; then
189+
PADDLE_VERSION="paddle version"
190+
CMD='"paddle", "version"'
191+
else
192+
PADDLE_VERSION="true"
193+
CMD='"true"'
194+
fi
195+
186196
cat >> /paddle/build/Dockerfile <<EOF
187197
ADD python/dist/*.whl /
188198
# run paddle version to install python packages first
@@ -192,15 +202,15 @@ EOF
192202
pip install /*.whl; apt-get install -f -y && \
193203
apt-get clean -y && \
194204
rm -f /*.whl && \
195-
paddle version && \
205+
${PADDLE_VERSION} && \
196206
ldconfig
197207
${DOCKERFILE_CUDNN_DSO}
198208
${DOCKERFILE_GPU_ENV}
199209
ENV NCCL_LAUNCH_MODE PARALLEL
200210
ADD go/cmd/pserver/pserver /usr/bin/
201211
ADD go/cmd/master/master /usr/bin/
202212
# default command shows the paddle version and exit
203-
CMD ["paddle", "version"]
213+
CMD [${CMD}]
204214
EOF
205215
}
206216

0 commit comments

Comments
 (0)