File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- function container_running() {
18
- name=$1
19
- docker ps -a --format " {{.Names}}" | grep " ${name} " > /dev/null
20
- return $?
21
- }
22
-
23
17
function start_build_docker() {
24
18
docker pull $IMG
25
19
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
-
31
20
apt_mirror=' s#http://archive.ubuntu.com/ubuntu#mirror://mirrors.ubuntu.com/mirrors.txt#g'
32
21
DOCKER_ENV=$( cat << EOL
33
22
-e FLAGS_fraction_of_gpu_memory_to_use=0.15 \
61
50
fi
62
51
set -ex
63
52
${DOCKER_CMD} run -it \
64
- --name $CONTAINER_ID \
65
53
${DOCKER_ENV} \
66
54
-e SCRIPT_NAME=$0 \
67
55
-v $PADDLE_ROOT :/paddle \
75
63
function main() {
76
64
DOCKER_REPO=" paddlepaddle/paddle"
77
65
VERSION=" latest-dev"
78
- CONTAINER_ID=" ${USER} _paddle_dev"
79
66
PADDLE_ROOT=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../../" && pwd ) "
80
67
if [ " $1 " == " build_android" ]; then
81
- CONTAINER_ID=" ${USER} _paddle_dev_android"
82
68
VERSION=" latest-dev-android"
83
69
fi
84
70
IMG=${DOCKER_REPO} :${VERSION}
You can’t perform that action at this time.
0 commit comments