containerJobData.ts 489 Bytes
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
3

4
export const CONTAINER_INSTALL_NNI_SHELL_FORMAT: string =
5
6
7
`#!/bin/bash
if python3 -c 'import nni' > /dev/null 2>&1; then
  # nni module is already installed, skip
8
  :
9
10
else
  # Install nni
11
  python3 -m pip install --user --upgrade nni
12
fi`;
Ni Hao's avatar
Ni Hao committed
13
14
15
16
17
18

export const CONTAINER_INSTALL_NNI_SHELL_FORMAT_FOR_WIN: string =
`python -c "import nni" 2>$error
if ($error -ne ''){
  python -m pip install --user --upgrade nni
}
19
exit`;