stellargraph/stellargraph

View on GitHub
.buildkite/docker-compose.yml

Summary

Maintainability
Test Coverage
---
version: "3.4"
services:
  runner-3_6: &runner-config
    build: &runner-build
      context: .
      dockerfile: docker/stellargraph-ci-runner/Dockerfile
      args:
        PYTHON_VERSION: "3.6"
        # this can be set at the build level to have the whole build use pre-release versions of
        # dependencies
        PRERELEASE_VERSIONS: &prerelease "${PRERELEASE_VERSIONS:-0}"
    working_dir: /workdir
    volumes: &runner-volumes
      - $PWD:/workdir
      # We need to manually bring in buildkite-agent
      # (https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/issues/158)
      - ${BUILDKITE_AGENT_BINARY_PATH:-/usr/bin/buildkite-agent}:/usr/bin/buildkite-agent
      # Needed for GPU g4dn.xlarge EC2 instance
      - /usr/local/cuda-10.1/:/usr/local/cuda10.1/
      - /var/lib/buildkite-agent/TensorRT-6.0.1.5/targets/x86_64-linux-gnu/lib/:/var/lib/buildkite-agent/TensorRT-6.0.1.5/targets/x86_64-linux-gnu/lib/
      - /usr/lib64/libcublas.so.10:/usr/lib64/libcublas.so.10
      - /usr/lib64/libcublasLt.so.10:/usr/lib64/libcublasLt.so.10
    environment: &runner-environment
      - PYTHONDONTWRITEBYTECODE=1
      # make sure that no new uses of the legacy constructor are added (see also: test in
      # test_graph.py, filterwarnings in pytest.ini)
      - "PYTHONWARNINGS=error:Constructing a StellarGraph:DeprecationWarning"
      - GIT_BRANCH=$BUILDKITE_BRANCH
      - BUILDKITE_AGENT_ACCESS_TOKEN
      - BUILDKITE_BUILD_NUMBER
      - BUILDKITE_BRANCH
      - AWS_LOGS_BUCKET
      - BUILDKITE_PARALLEL_JOB_COUNT
      - BUILDKITE_PARALLEL_JOB
      - BUILDKITE_ORGANIZATION_SLUG
      - BUILDKITE_PIPELINE_SLUG
      # codecov needs extra info from Buildkite environment:
      - CI
      - BUILDKITE
      - BUILDKITE_PULL_REQUEST
      - BUILDKITE_JOB_ID
      - BUILDKITE_BUILD_URL
      - BUILDKITE_PROJECT_SLUG
      - BUILDKITE_COMMIT
      - BUILDKITE_TAG
      - CODECOV_TOKEN
      - NEO4J_VERSION
      - STELLARGRAPH_MUST_USE_GPU
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=all
      - LD_LIBRARY_PATH=/usr/local/cuda10.1/lib64/:/var/lib/buildkite-agent/TensorRT-6.0.1.5/targets/x86_64-linux-gnu/lib/:/usr/lib64/libcublas.so.10:/usr/lib64/libcublasLt.so.10
    depends_on:
      - ${RUNNER_DEPENDS_ON:-empty-service}

  runner-3_7:
    <<: *runner-config
    build:
      <<: *runner-build
      args:
        PYTHON_VERSION: "3.7"
        PRERELEASE_VERSIONS: *prerelease

  runner-3_8:
    <<: *runner-config
    build:
      <<: *runner-build
      args:
        PYTHON_VERSION: "3.8"
        PRERELEASE_VERSIONS: *prerelease

  # a service that does nothing to use as a default depends_on for the runners
  empty-service:
    image: alpine:3.10

  neo4j:
    build:
      context: docker/stellargraph-neo4j
      args:
        - NEO4J_VERSION
    environment:
      # this is running entirely locally on a CI machine, so authentication is unnecessary
      NEO4J_AUTH: "none"

  conda:
    image: continuumio/anaconda3
    working_dir: /workdir
    volumes: *runner-volumes
    environment: *runner-environment