diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1768f87..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,218 +0,0 @@ -# Python CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-python/ for more details -# -version: 2.1 - -# ------------------------------------------------------------------------------------- -# Environments to run the jobs in -# ------------------------------------------------------------------------------------- -cpu: &cpu - docker: - - image: circleci/python:3.7 - auth: - username: $DOCKERHUB_USERNAME - password: $DOCKERHUB_TOKEN - resource_class: medium - -gpu: &gpu - machine: - image: ubuntu-2004-cuda-11.4:202110-01 - docker_layer_caching: true - resource_class: gpu.nvidia.small - -# ------------------------------------------------------------------------------------- -# Re-usable commands -# ------------------------------------------------------------------------------------- -setup_venv: &setup_venv - - run: - name: Setup Virtual Env - working_directory: ~/ - command: | - python -m venv ~/venv - echo ". ~/venv/bin/activate" >> $BASH_ENV - . ~/venv/bin/activate - python --version - which python - which pip - pip install --upgrade pip - -install_dep: &install_dep - - run: - name: Install Dependencies - command: | - pip install --progress-bar off torch shapely - -install_fvcore: &install_fvcore - - run: - name: Install fvcore - command: | - BUILD_NIGHTLY=1 python setup.py sdist - pip install . -U - python -c 'import fvcore; print(fvcore.__version__)' - -run_unittests: &run_unittests - - run: - name: Run Unit Tests - command: | - python -m unittest discover -v -s tests - python -m unittest discover -v -s io_tests - -# ------------------------------------------------------------------------------------- -# Jobs to run -# ------------------------------------------------------------------------------------- -jobs: - cpu_tests: - <<: *cpu - - working_directory: ~/fvcore - - steps: - - checkout - - <<: *setup_venv - - # Cache the venv directory that contains dependencies - - restore_cache: - keys: - - cache-key-{{ .Branch }}-ID-20200130 - - - <<: *install_dep - - - save_cache: - paths: - - ~/venv - key: cache-key-{{ .Branch }}-ID-20200130 - - - <<: *install_fvcore - - - <<: *run_unittests - - - store_artifacts: - path: ~/fvcore/dist - - persist_to_workspace: - root: ~/fvcore/dist - paths: - - "*" - - gpu_tests: - <<: *gpu - - working_directory: ~/fvcore - - steps: - - checkout - - run: - name: Install nvidia-docker - working_directory: ~/ - command: | - curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) - curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ - sudo tee /etc/apt/sources.list.d/nvidia-docker.list - sudo apt-get update && sudo apt-get install -y nvidia-docker2 - # reload the docker daemon configuration - sudo pkill -SIGHUP dockerd - - - run: - name: Launch docker - command: | - # https://support.circleci.com/hc/en-us/articles/360050623311-Docker-Hub-rate-limiting-FAQ - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN - nvidia-docker run -itd --name fvcore pytorch/pytorch - docker exec -it fvcore nvidia-smi - - - run: - name: Install fvcore - command: | - docker cp ~/fvcore fvcore:/fvcore - docker exec -it fvcore pip install -e '/fvcore[all]' - - - run: - name: Run Unit Tests - command: | - docker exec -it fvcore python -m unittest discover -v -s /fvcore/tests - - upload_wheel: - docker: - - image: circleci/python:3.7 - auth: - username: $DOCKERHUB_USERNAME - password: $DOCKERHUB_TOKEN - working_directory: ~/fvcore - steps: - - checkout - - attach_workspace: - at: ~/workspace - - run: - command: | - # no commits in the last 25 hours - if [[ -z $(git log --since="25 hours ago") ]]; then - echo "No commits in the last day." - exit 0 - fi - pip install --progress-bar off --user twine - for pkg in ~/workspace/*.tar.gz; do - twine upload $pkg - done - - build_conda: - docker: - - image: continuumio/miniconda3 - auth: - username: $DOCKERHUB_USERNAME - password: $DOCKERHUB_TOKEN - steps: - - checkout - - run: - name: Build Conda Package - command: | - # no commits in the last 25 hours - if [[ -z $(git log --since="25 hours ago") ]]; then - echo "No commits in the last day." - exit 0 - fi - conda install conda-build - bash packaging/build_all_conda.sh - - store_artifacts: - path: packaging/output_files - -workflows: - version: 2 - regular_test: - jobs: - - cpu_tests: - context: - - DOCKERHUB_TOKEN - - gpu_tests: - context: - - DOCKERHUB_TOKEN - - nightly: - jobs: - # https://circleci.com/docs/2.0/contexts/#creating-and-using-a-context - - cpu_tests: - context: - - DOCKERHUB_TOKEN - - gpu_tests: - context: - - DOCKERHUB_TOKEN - - build_conda: - requires: - - cpu_tests - - gpu_tests - context: - - DOCKERHUB_TOKEN - - upload_wheel: - requires: - - cpu_tests - - gpu_tests - context: - - DOCKERHUB_TOKEN - triggers: - - schedule: - # runs at 8am UTC, being 12am or 1am MPK - cron: "0 8 * * *" - filters: - branches: - only: - - main