integration-test-remote-l2l.yml 3.26 KB
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
trigger: none
pr: none
Yuge Zhang's avatar
Yuge Zhang committed
3
4
5
6
schedules:
- cron: 0 20 * * *
  branches:
    include: [ master ]
liuzhe-lz's avatar
liuzhe-lz committed
7
8
9
10
11
12
13
14

# variables set on VSO: (for security concern)
#   manager_ip
#   worker_ip
#   password_in_docker

jobs:
- job: remote_linux2linux
15
  pool: nni-it
16
  timeoutInMinutes: 120
liuzhe-lz's avatar
liuzhe-lz committed
17
18

  steps:
19
20
  # FIXME: GPU is not supported yet.
  # Change to ubuntu-latest-gpu when it's done.
liuzhe-lz's avatar
liuzhe-lz committed
21

22
23
24
25
  - template: templates/install-dependencies.yml
    parameters:
      platform: ubuntu-latest
      python_env: venv
liuzhe-lz's avatar
liuzhe-lz committed
26

27
28
29
30
  - template: templates/install-nni.yml
    parameters:
      wheel: true
      extra_dep: SMAC,BOHB
liuzhe-lz's avatar
liuzhe-lz committed
31

32
  - template: templates/install-customized-tuner.yml
liuzhe-lz's avatar
liuzhe-lz committed
33

34
35
36
  - script: |
      sudo systemctl enable nfs-kernel-server
    displayName: Enable NFS service
liuzhe-lz's avatar
liuzhe-lz committed
37

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  - script: |
      set -e
      mkdir -p /tmp/nnitest/$(Build.BuildId)
      cp Dockerfile /tmp/nnitest/$(Build.BuildId)
      cp -r dist /tmp/nnitest/$(Build.BuildId)
      cp -r test /tmp/nnitest/$(Build.BuildId)
      cp -r test/vso_tools/interim_patch.py /tmp/nnitest/$(Build.BuildId)
    displayName: Prepare for docker

  # TODO: Delete variables on pipeline when the PR that introduced this is merged.
  - script: |
      set -e
      export worker_ip=localhost
      export manager_ip=host.docker.internal
      export password_in_docker=123456
      export NFS_IP=host.docker.internal
      export Exported_Directory=/var/nfs/general
      echo "##vso[task.setvariable variable=worker_ip]${worker_ip}"
      echo "##vso[task.setvariable variable=manager_ip]${manager_ip}"
      echo "##vso[task.setvariable variable=password_in_docker]${password_in_docker}"
      echo "##vso[task.setvariable variable=NFS_IP]${NFS_IP}"
      echo "##vso[task.setvariable variable=Exported_Directory]${Exported_Directory}"
    displayName: Override environment variables
J-shang's avatar
J-shang committed
61

62
63
64
65
  - script: |
      set -e
      python /tmp/nnitest/$(Build.BuildId)/test/vso_tools/start_docker.py --sudo $(NNI_RELEASE) $(Build.BuildId) $(password_in_docker)
    displayName: Run a worker in docker
liuzhe-lz's avatar
liuzhe-lz committed
66
67
68

  - script: |
      cd test
69
      python training_service/nnitest/generate_ts_config.py \
liuzhe-lz's avatar
liuzhe-lz committed
70
          --ts remote \
71
          --remote_reuse true \
liuzhe-lz's avatar
liuzhe-lz committed
72
73
74
75
          --remote_user nni \
          --remote_host $(worker_ip) \
          --remote_port $(docker_port) \
          --remote_pwd $(password_in_docker) \
76
77
          --nni_manager_ip $(manager_ip) \
          --azurestoragetoken $(azureblob_token_test) \
78
79
80
81
          --nfs_server $(NFS_IP) \
          --local_mount_point $(LOCAL_MOUNT_POINT) \
          --remote_mount_point $(REMOTE_MOUNT_POINT) \
          --exported_directory $(Exported_Directory)
82
      python training_service/nnitest/run_tests.py --config training_service/config/integration_tests.yml --ts remote
83
    displayName: Integration test (reuse mode)
liuzhe-lz's avatar
liuzhe-lz committed
84
85
86

  - script: |
      cd test
87
      python training_service/nnitest/generate_ts_config.py \
liuzhe-lz's avatar
liuzhe-lz committed
88
          --ts remote \
89
          --remote_reuse false \
liuzhe-lz's avatar
liuzhe-lz committed
90
91
92
93
94
          --remote_user nni \
          --remote_host $(worker_ip) \
          --remote_port $(docker_port) \
          --remote_pwd $(password_in_docker) \
          --nni_manager_ip $(manager_ip)
95
      python training_service/nnitest/run_tests.py --config training_service/config/integration_tests.yml --ts remote
96
97
    displayName: Integration test

98
99
100
  - template: templates/save-crashed-info.yml
    parameters:
      remote: true