-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (21 loc) · 1.15 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
sudo: required
services:
- docker
before_script:
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
script:
- travis_wait 30 docker image build -t $DOCKER_USERNAME/ml-base-mini -f Dockerfile.mini.base .
- travis_wait 30 docker image build -t $DOCKER_USERNAME/ml-tensorflow-mini -f Dockerfile.mini.tensorflow .
- travis_wait 30 docker image build -t $DOCKER_USERNAME/ml-keras-mini -f Dockerfile.mini.keras .
- travis_wait 30 docker image build -t $DOCKER_USERNAME/ml-pytorch-mini -f Dockerfile.mini.pytorch .
before_cache:
- mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep continuumio | xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
cache:
directories:
- $HOME/docker
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $DOCKER_USERNAME/ml-base-mini
- docker push $DOCKER_USERNAME/ml-tensorflow-mini
- docker push $DOCKER_USERNAME/ml-keras-mini
- docker push $DOCKER_USERNAME/ml-pytorch-mini