mirror of https://github.com/open-mmlab/mmocr.git
parent
a0ed5f49f1
commit
6b4edad7be
|
@ -1,47 +0,0 @@
|
|||
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
|
43
.travis.yml
43
.travis.yml
|
@ -1,43 +0,0 @@
|
|||
dist: bionic # ubuntu 18.04
|
||||
language: python
|
||||
|
||||
python:
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
|
||||
env: CUDA=10.1.105-1 CUDA_SHORT=10.1 UBUNTU_VERSION=ubuntu1804 FORCE_CUDA=1
|
||||
cache: pip
|
||||
|
||||
# Ref to CUDA installation in Travis: https://github.com/jeremad/cuda-travis
|
||||
before_install:
|
||||
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
|
||||
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
|
||||
- sudo dpkg -i ${INSTALLER}
|
||||
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
|
||||
- sudo apt-key add 7fa2af80.pub
|
||||
- sudo apt update -qq
|
||||
- sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
|
||||
- sudo apt clean
|
||||
- CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
|
||||
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
|
||||
- PATH=${CUDA_HOME}/bin:${PATH}
|
||||
|
||||
install:
|
||||
- pip install Pillow==6.2.2 # remove this line when torchvision>=0.5
|
||||
- pip install torch==1.2 torchvision==0.4.0 # TODO: fix CI for pytorch>1.2
|
||||
- pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
|
||||
- pip install -r requirements.txt
|
||||
|
||||
before_script:
|
||||
- flake8 .
|
||||
- isort -rc --check-only --diff mmocr/ tools/ tests/
|
||||
- yapf -r -d --style .style.yapf mmocr/ tools/ tests/ configs/
|
||||
|
||||
script:
|
||||
- python setup.py check -m -s
|
||||
- python setup.py build_ext --inplace
|
||||
- coverage run --source mmocr -m py.test -v --xdoctest-modules tests mmocr
|
||||
|
||||
after_success:
|
||||
- coverage report
|
Loading…
Reference in New Issue