Nils Werner, Lorenz Schmidt
nils.werner@audiolabs-erlangen.com
International Audio Laboratories Erlangen
make
pytest
train.py
git push
.gitlab-ci.yml
file.gitlab-ci.yml
file¶What data do you need?
.gitlab-ci.yml
Example¶# .gitlab-ci.yml
test:3.8: # Task name
image: python:3.8 # Task environment (Docker image)
before_script: # Task environment setup
- apt-get install -yy libsndfile1-dev
- pip install -U pip wheel
- pip install -e .
script: # Task execution
- py.test
test:3.8:
image: python:3.8
script:
# ...
test:3.9:
image: python:3.9
script:
# ...
stages:
- tests
- docs
test:3.8:
stage: tests
script:
# ...
docs:
stage: docs
script:
# ...
build:
# ...
artifacts:
paths:
- ClassicThesis.pdf
build:
# ...
artifacts:
paths:
- ClassicThesis.pdf
test:
# ...
dependencies:
- build # `ClassicThesis.pdf` will be available
variables: # Environment variables set in code
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
test:3.8:
# ...
script:
- pip install numpy # pip uses the variable $PIP_CACHE_DIR by default
test:3.8:
# ...
script:
- python $SECRET # Defined in Gitlab settings, not in code
train:
tags: # Runners with all tags will run this
- cuda11
- gtx1080
# ...
script:
- python train.py
pages: # task name `pages` is important
# ... # script must produce output in public/
artifacts:
paths:
- public
Your repo https://git.audiolabs.uni-erlangen.de/$user/$repo/
Will be visible under https://$user.pages.audiolabs.uni-erlangen.de/$repo/
.job_template: &job_definition
# ...
script:
- py.test
test:3.8:
image: python:3.8
<<: *job_definition
test:3.9:
image: python:3.9
<<: *job_definition
cache:
paths:
- downloaded-data/ # Will be restored on subsequent runs
test:3.8:
image: python:3.8
script:
# ...
test:3.8:
image: python:3.8
script:
# ...
only:
- master
Only runs on the master
branch
nils/ci-examples
nils/s-tdar-paper-2019
nils/mlops
nils/subband-merging
nils/impfbot
python/pyrir
pip install -U pip wheel
firstapt-get update -yy
first# .gitlab-ci.yml
test:3.8: # Task name
image: python:3.8 # Task environment (Docker image)
before_script: # Task environment setup
- apt-get install -yy libsndfile1-dev
- pip install -U pip wheel
- pip install -e .
script: # Task execution
- py.test
https://docs.gitlab.com/ee/ci/
https://git.audiolabs.uni-erlangen.de/nils/ci-examples
nils.werner@audiolabs-erlangen.com
@nlswrnr
https://www.audiolabs-erlangen.de/fau/assistant/werner