Beispiel #1
0
    def __createTask(self):
        # moved import here, otherwise it asks to install ncluster on AWS machine
        from ncluster import use_aws, make_task
        use_aws()
        taskName = self.args.time
        self.logger.addRow([['Task name', taskName]])
        aws = make_task(instance_type='p3.16xlarge',
                        name=taskName,
                        image_name='Deep Learning AMI (Ubuntu) Version 16.0')

        return aws
#!/usr/bin/env python
# Usage:
# ./launch_tensorboard.py
#
# This will launch r5.large machine on AWS with tensoboard, and print URL
# in the console
import ncluster
ncluster.use_aws()

task = ncluster.make_task('tensorboard',
                          instance_type='r5.large',
                          image_name='Deep Learning AMI (Ubuntu) Version 13.0')
task.run('source activate tensorflow_p36')
task.run(f'tensorboard --logdir={task.logdir}/..', async=True)
print(f"Tensorboard at http://{task.public_ip}:6006")