buildall.sh 1.2 KB
Newer Older
Y
yi.wu 已提交
1 2 3
#!/bin/bash

BINARIES_DIR=paddle/scripts/docker/buildimage/binaries
Y
yi.wu 已提交
4
BUILD_DIR=$PWD/build
Y
yi.wu 已提交
5 6

function build_in_docker() {
Y
yi.wu 已提交
7 8 9 10 11 12 13
  if [ ! -d $BUILD_DIR ]; then
    mkdir -p $BUILD_DIR
  fi
  docker build . -t paddle-build-env -f paddle/scripts/docker/paddle-dev/Dockerfile
  # FIXME: need to wait a signal not sleeping
  BUILDER=$(docker run -d -v ${PWD}:/paddle  paddle-build-env sleep 3600)
  # TODO(typhoonzero):
Y
yi.wu 已提交
14 15
  docker exec $BUILDER /bin/bash -c "export BUILD_AND_INSTALL=ON && /paddle/paddle/scripts/docker/build.sh"
  mkdir -p $BINARIES_DIR
Y
yi.wu 已提交
16 17 18 19 20 21 22
  # docker cp $BUILDER:/usr/local/opt/paddle/bin/paddle_pserver_main $BINARIES_DIR
  # docker cp $BUILDER:/usr/local/opt/paddle/bin/paddle_trainer $BINARIES_DIR
  # docker cp $BUILDER:/usr/local/opt/paddle/bin/paddle_merge_model $BINARIES_DIR
  # docker cp $BUILDER:/usr/local/bin/paddle $BINARIES_DIR
  # docker cp $BUILDER:/usr/local/opt/paddle/bin/paddle_usage $BINARIES_DIR
  #
  # docker cp $BUILDER:/usr/local/opt/paddle/share/wheels $BINARIES_DIR
Y
yi.wu 已提交
23 24 25 26 27 28 29 30 31

  docker stop $BUILDER && docker rm $BUILDER
}

function build_paddle_core() {
  docker build . -t paddle-core -f paddle/scripts/docker/paddle-core/Dockerfile
}

build_in_docker
Y
yi.wu 已提交
32
#build_paddle_core