Skip to content

Commit f0c4088

Browse files
authored
Build: remove fixed container name to allow multiple build together. (#10780)
1 parent 3a385d2 commit f0c4088

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

paddle/scripts/paddle_docker_build.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
function container_running() {
18-
name=$1
19-
docker ps -a --format "{{.Names}}" | grep "${name}" > /dev/null
20-
return $?
21-
}
22-
2317
function start_build_docker() {
2418
docker pull $IMG
2519

26-
if container_running "${CONTAINER_ID}"; then
27-
docker stop "${CONTAINER_ID}" 1>/dev/null
28-
docker rm -f "${CONTAINER_ID}" 1>/dev/null
29-
fi
30-
3120
apt_mirror='s#http://archive.ubuntu.com/ubuntu#mirror://mirrors.ubuntu.com/mirrors.txt#g'
3221
DOCKER_ENV=$(cat <<EOL
3322
-e FLAGS_fraction_of_gpu_memory_to_use=0.15 \
@@ -61,7 +50,6 @@ EOL
6150
fi
6251
set -ex
6352
${DOCKER_CMD} run -it \
64-
--name $CONTAINER_ID \
6553
${DOCKER_ENV} \
6654
-e SCRIPT_NAME=$0 \
6755
-v $PADDLE_ROOT:/paddle \
@@ -75,10 +63,8 @@ EOL
7563
function main() {
7664
DOCKER_REPO="paddlepaddle/paddle"
7765
VERSION="latest-dev"
78-
CONTAINER_ID="${USER}_paddle_dev"
7966
PADDLE_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../../" && pwd )"
8067
if [ "$1" == "build_android" ]; then
81-
CONTAINER_ID="${USER}_paddle_dev_android"
8268
VERSION="latest-dev-android"
8369
fi
8470
IMG=${DOCKER_REPO}:${VERSION}

0 commit comments

Comments
 (0)