mmpretrain/.gitlab-ci.yml

45 lines
1.1 KiB
YAML

variables:
PARROTS_IMAGE: registry.sensetime.com/platform/product:pat20200612
PYTORCH_IMAGE: registry.sensetime.com/eig-research/pytorch:1.3.1-cuda10.1-cudnn7-devel
stages:
- linting
- test
before_script:
- echo $PATH
- gcc --version
- python --version
- pip --version
- nvcc --version
- nvidia-smi
- python -c "import torch; print(torch.__version__)"
linting:
image: $PYTORCH_IMAGE
stage: linting
script:
- pip install flake8 yapf isort
- flake8 .
- isort -rc --check-only --diff mmcls/ tools/ tests/
- yapf -r -d mmcls/ tools/ tests/ configs/
.test_template: &test_template_def
stage: test
script:
- echo "Start building..."
- pip install pillow==6.2.1
- pip install -e .
- python -c "import mmcls; print(mmcls.__version__)"
- echo "Start testing..."
- pip install pytest coverage
- coverage run --source mmcls -m pytest tests/
- coverage report -m
test:pytorch1.3-cuda10:
image: $PYTORCH_IMAGE
<<: *test_template_def
test:pat0.6.0dev-cuda9:
image: $PARROTS_IMAGE
<<: *test_template_def