2020-08-20 02:03:22 +00:00
|
|
|
# Copyright The PyTorch Lightning team.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2020-03-11 19:39:59 +00:00
|
|
|
# https://docs.drone.io/pipeline/docker/examples/languages/python/#python-example
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: torch-GPU
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: testing
|
2020-11-03 18:01:51 +00:00
|
|
|
image: pytorchlightning/pytorch_lightning:base-cuda-py3.7-torch1.6
|
2020-04-02 16:28:44 +00:00
|
|
|
|
2020-03-14 17:01:57 +00:00
|
|
|
environment:
|
|
|
|
CODECOV_TOKEN:
|
|
|
|
from_secret: codecov_token
|
2020-12-02 10:00:05 +00:00
|
|
|
AUTH_TOKEN:
|
|
|
|
from_secret: gh_auth_token
|
2020-07-31 12:23:13 +00:00
|
|
|
MKL_THREADING_LAYER: GNU
|
2020-04-02 16:28:44 +00:00
|
|
|
|
2020-03-11 19:39:59 +00:00
|
|
|
commands:
|
|
|
|
- python --version
|
|
|
|
- pip --version
|
|
|
|
- nvidia-smi
|
2020-12-20 00:32:17 +00:00
|
|
|
- pip install -r ./requirements/devel.txt --upgrade-strategy only-if-needed --no-cache-dir
|
|
|
|
- pip install git+https://${AUTH_TOKEN}@github.com/PyTorchLightning/lightning-dtrun.git@v0.0.2 --no-cache-dir
|
2020-11-06 14:53:46 +00:00
|
|
|
# when Image has defined CUDa version we can switch to this package spec "nvidia-dali-cuda${CUDA_VERSION%%.*}0"
|
2020-12-18 14:42:36 +00:00
|
|
|
- pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100 --upgrade-strategy only-if-needed
|
2020-03-11 19:39:59 +00:00
|
|
|
- pip list
|
2020-12-07 12:55:49 +00:00
|
|
|
- python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=25 # --flake8
|
|
|
|
# Running special tests
|
|
|
|
- sh tests/special_tests.sh
|
2020-03-19 13:14:29 +00:00
|
|
|
- coverage report
|
2020-12-07 12:55:49 +00:00
|
|
|
- python -m pytest benchmarks pl_examples -v --maxfail=2 --durations=0
|
2020-07-02 01:44:19 +00:00
|
|
|
# see: https://docs.codecov.io/docs/merging-reports
|
2020-07-07 19:26:58 +00:00
|
|
|
- codecov --token $CODECOV_TOKEN --flags=gpu,pytest --name="GPU-coverage" --env=linux --build $DRONE_BUILD_NUMBER --commit $DRONE_COMMIT
|
2020-07-04 15:31:12 +00:00
|
|
|
# --build $DRONE_BUILD_NUMBER --branch $DRONE_BRANCH --commit $DRONE_COMMIT --tag $DRONE_TAG --pr $DRONE_PULL_REQUEST
|
|
|
|
# - codecov --token $CODECOV_TOKEN --flags=gpu,pytest --build $DRONE_BUILD_NUMBER
|
2020-03-27 12:45:52 +00:00
|
|
|
- python tests/collect_env_details.py
|
2020-04-02 16:28:44 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
2020-11-04 09:08:37 +00:00
|
|
|
- release/*
|
2020-04-02 16:28:44 +00:00
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- push
|
|
|
|
- pull_request
|