|
1 | | -import click |
2 | 1 |
|
| 2 | +import click |
| 3 | +#import colorama |
| 4 | +#import dotenv |
| 5 | +import sky |
| 6 | +from file_merger import mergeYaml |
| 7 | +from launch_cli import launch as cli_launch |
3 | 8 | @click.group() |
4 | 9 | def cli(): |
5 | 10 | pass |
6 | 11 |
|
7 | | -@cli.command() |
8 | | -def foo(): |
9 | | - click.echo('bar') |
| 12 | +@click.command() |
| 13 | +#@click.option('--count', default=1, help='Number of greetings.') |
| 14 | +#@click.option('--name', prompt='Your name', |
| 15 | +# help='The person to greet.') |
| 16 | +def status(): |
| 17 | + task = sky.Task(run='echo hello SkyPilot') |
| 18 | + task.set_resources(sky.Resources(cloud=sky.AWS(), accelerators='V100:4')) |
| 19 | + sky.launch(task, cluster_name='my-cluster') |
| 20 | + click.echo(sky.status(cluster_names=None, refresh=False)) |
| 21 | + """Simple program that greets NAME for a total of COUNT times.""" |
| 22 | + #for x in range(count): |
| 23 | + # click.echo(f"Hello {name}!") |
| 24 | + |
| 25 | +cli.add_command(status) |
| 26 | + |
| 27 | +@click.command() |
| 28 | +#@click.option('--count', default=1, help='Number of greetings.') |
| 29 | +#@click.option('--name', prompt='Your name', |
| 30 | +# help='The person to greet.') |
| 31 | +def launch(): |
| 32 | + print('Launch Mode ::') |
| 33 | + ''' |
| 34 | + task = sky.Task(run='echo hello SkyPilot') |
| 35 | + task.set_resources(sky.Resources(cloud=sky.AWS(), accelerators='V100:4')) |
| 36 | + sky.launch(task, cluster_name='my-cluster') |
| 37 | + click.echo(sky.status(cluster_names=None, refresh=False)) |
| 38 | + ''' |
| 39 | + |
| 40 | + # print(mergeYaml(devPath='dev.yaml',pymcPath='pymc.yaml')) |
| 41 | + cli_launch() |
| 42 | + |
| 43 | + """Simple program that greets NAME for a total of COUNT times.""" |
| 44 | + #for x in range(count): |
| 45 | + # click.echo(f"Hello {name}!") |
| 46 | + |
| 47 | +cli.add_command(launch) |
| 48 | +if __name__ == '__main__': |
| 49 | + cli() |
0 commit comments