コード例 #1
0
def flags(parser):
    """Add command line flags for the `create` subcommand.

    Args:
      parser: The argparse parser to which to add the flags.
    """
    create.flags(parser)
    parser.set_defaults(image_name='gcr.io/cloud-datalab/datalab-gpu:latest')

    parser.add_argument(
        '--accelerator-type',
        dest='accelerator_type',
        default='nvidia-tesla-k80',
        help=('the accelerator type of the instance.'
              '\n\n'
              'Datalab currently only supports nvidia-tesla-k80.'
              '\n\n'
              'If not specified, the default type is none.'))

    parser.add_argument('--accelerator-count',
                        dest='accelerator_count',
                        type=int,
                        default=1,
                        help=('the accelerator count of the instance, used if '
                              'accelerator-type is specified.'
                              '\n\n'
                              'If not specified, the default type is 1.'))
    return
コード例 #2
0
ファイル: creategpu.py プロジェクト: mwengren/datalab
def flags(parser):
    """Add command line flags for the `create` subcommand.

    Args:
      parser: The argparse parser to which to add the flags.
    """
    create.flags(parser)
    parser.set_defaults(image_name='gcr.io/cloud-datalab/datalab-gpu:latest')

    parser.add_argument(
        '--accelerator-type',
        dest='accelerator_type',
        default='nvidia-tesla-k80',
        help=(
            'the accelerator type of the instance.'
            '\n\n'
            'Datalab currently only supports nvidia-tesla-k80.'
            '\n\n'
            'If not specified, the default type is none.'))

    parser.add_argument(
        '--accelerator-count',
        dest='accelerator_count',
        type=int,
        default=1,
        help=(
            'the accelerator count of the instance, used if '
            'accelerator-type is specified.'
            '\n\n'
            'If not specified, the default type is 1.'))
    return