pipelines-it-remote-windows-to-linux.yml 2.63 KB
Newer Older
1
jobs:
Chi Song's avatar
Chi Song committed
2
- job: 'integration_test_remote_windows_to_linux'
chicm-ms's avatar
chicm-ms committed
3
  timeoutInMinutes: 120
4
5
6
7
8
9
10
11
12
13

  steps:
  - script: python -m pip install --upgrade pip setuptools
    displayName: 'Install python tools'
  - task: CopyFilesOverSSH@0
    inputs:
      sshEndpoint: $(end_point)
      targetFolder: /tmp/nnitest/$(Build.BuildId)/nni-remote
      overwrite: true
    displayName: 'Copy all files to remote machine'
chicm-ms's avatar
chicm-ms committed
14
    timeoutInMinutes: 10
15
16
17
18
  - script: |
      powershell.exe -file install.ps1
    displayName: 'Install nni toolkit via source code'
  - script: |
19
      python -m pip install scikit-learn==0.23.2 --user
20
    displayName: 'Install dependencies for integration tests'
21
22
23
24
25
  - script: |
      cd examples/tuners/customized_tuner
      python setup.py develop --user
      nnictl package install ./
    displayName: 'Install demotuner for customized_tuner test'
26
27
28
29
30
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: inline
      inline: cd /tmp/nnitest/$(Build.BuildId)/nni-remote/deployment/pypi;make build
Chi Song's avatar
Chi Song committed
31
      failOnStdErr: false
32
33
34
35
36
37
    continueOnError: true
    displayName: 'build nni bdsit_wheel'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
chicm-ms's avatar
chicm-ms committed
38
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode start --name $(Build.BuildId) --image nni/nni --os windows
39
40
41
42
    displayName: 'Start docker'
  - powershell: |
      Write-Host "Downloading Putty..."
      (New-Object Net.WebClient).DownloadFile("https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe", "$(Agent.TempDirectory)\pscp.exe")
Scarlett Li's avatar
Scarlett Li committed
43
44
45
46
      Write-Host "Download Putty success!"
      Write-Host "Connecting to host..."
      $(Agent.TempDirectory)\pscp.exe -P $(remote_port) -hostkey $(hostkey) -pw $(pscp_pwd) $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test\port
      Write-Host "Get port success!"
47
48
49
50
      Get-Content test\port
    displayName: 'Get docker port'
  - powershell: |
      cd test
51
      python nni_test/nnitest/generate_ts_config.py --ts remote --remote_reuse $(remote_reuse) --remote_user $(docker_user) --remote_host $(remote_host) --remote_port $(Get-Content port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
chicm-ms's avatar
chicm-ms committed
52
53
      Get-Content config/training_service.yml
      python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote --exclude cifar10
54
55
56
57
58
    displayName: 'integration test'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
chicm-ms's avatar
chicm-ms committed
59
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode stop --name $(Build.BuildId) --os windows
60
    displayName: 'Stop docker'