Sebastian Pölsterl
sebastian.poelsterl@icr.ac.uk
C4RR, 28 June 2017
.gitlab-ci.yml
)image: gitlab/dind
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
after_script:
- docker logout registry.gitlab.com
build:
script:
- docker build --pull -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
stage: build
tags:
- docker
test:pytest:
script:
- docker pull $CI_REGISTRY_IMAGE
- docker run --name pytest --entrypoint /bin/bash $CI_REGISTRY_IMAGE
-c "pytest -c /pytest.ini --cov-config /.coveragerc
--cov-report=html:cov-report rbm_model"
- docker cp pytest:/data/cov-report - | tar xf -
artifacts:
paths:
- cov-report
stage: test
tags:
- docker
train:
script:
- docker pull $CI_REGISTRY_IMAGE
- docker run --name rbm_t -v /data $CI_REGISTRY_IMAGE train
-t /data -o /data/rbm-model.pkl --epochs 15
- docker run --rm --volumes-from rbm_trained $CI_REGISTRY_IMAGE sample
-t /data -m /data/rbm-model.pkl -o /data/samples.png
- docker cp rbm_trained:/data - | tar xf -
artifacts:
paths:
- data/
stage: deploy
tags:
- docker
A piece of code tends to work only for a single point in time and space
Errors are often discovered months after they have been introduced