mmocr/.gitlab-ci.yml

48 lines
891 B
YAML

variables:
PYTORCH_IMAGE: registry.sensetime.com/eig-research/pytorch:1.4-cuda10.1-cudnn7-mmocr
stages:
- test
- linting
- deploy
before_script:
- echo $PATH
- gcc --version
- nvcc --version
- python --version
- pip --version
- python -c "import torch; print(torch.__version__)"
- nvidia-smi
.linting_template: &linting_template_def
stage: linting
script:
- pip install pre-commit==2.6.0
- pre-commit install
- pre-commit run --all-files
test:
image: $PYTORCH_IMAGE
stage: test
script:
- pip install -r requirements.txt
- python setup.py develop
- export PYTHONPATH=`pwd`
- pytest
pages:
image: $PYTORCH_IMAGE
stage: deploy
script:
- pip install -r docs/requirements.txt
- sphinx-build -b html docs public
artifacts:
paths:
- public
linting:pytorch1.3-cuda10:
image: $PYTORCH_IMAGE
<<: *linting_template_def