integration-test-remote-l2l.yml 3.32 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
Yuge Zhang's avatar
Yuge Zhang committed
15
  pool: nni-it-1es-11
16
  timeoutInMinutes: 120
liuzhe-lz's avatar
liuzhe-lz committed
17
18

  steps:
Yuge Zhang's avatar
Yuge Zhang committed
19
  - template: templates/fix-apt-1es.yml
20
21
  # FIXME: GPU is not supported yet.
  # Change to ubuntu-latest-gpu when it's done.
liuzhe-lz's avatar
liuzhe-lz committed
22

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

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

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

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

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  - 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
62

63
64
65
66
  - 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
67
68
69

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

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

99
100
  - template: templates/save-crashed-info.yml
    parameters:
Yuge Zhang's avatar
Yuge Zhang committed
101
      training_service: remote