def create_docker_image_interactive(args): """Interactively create a docker image by selecting the desired combination from a menu.""" img = emu_downloads_menu.select_image(args.arm) or sys.exit(1) emulator = emu_downloads_menu.select_emulator() or sys.exit(1) cfg = DockerConfig() metrics = False if not cfg.decided_on_metrics(): cfg.set_collect_metrics( click.confirm( "Would you like to help make the emulator better by sending usage statistics to Google upon (graceful) emulator exit?" )) metrics = cfg.collect_metrics() emu_zip = emulator.download("linux") logging.info("Processing %s, %s", img, emu) sys_docker = SystemImageContainer(img, args.repo) if not sys_docker.available() and not sys_docker.can_pull(): sys_docker.build(args.dest) emu_docker = EmulatorContainer(emu_zip, sys_docker, args.repo, metrics) emu_docker.build(args.dest) if args.start: emu_docker.launch({"5555/tcp": 5555, "8554/tcp": 8554})
def create_docker_image_interactive(args): '''Interactively create a docker image by selecting the desired combination from a menu.''' img = emu_downloads_menu.select_image() or sys.exit(1) emu = emu_downloads_menu.select_emulator() or sys.exit(1) img_zip = img.download() emu_zip = emu.download('linux') create_docker(args.dest, emu_zip, img_zip, args.repo, args.extra)
def create_docker_image_interactive(args): """Interactively create a docker image by selecting the desired combination from a menu.""" img = emu_downloads_menu.select_image(args.arm) or sys.exit(1) emulator = emu_downloads_menu.select_emulator() or sys.exit(1) img_zip = img.download() emu_zip = emulator.download("linux") device = DockerDevice(emu_zip, img_zip, args.dest) device.create_docker_file(args.extra) img = device.create_container() if img and args.start: device.launch(img)
def create_docker_image_interactive(args): """Interactively create a docker image by selecting the desired combination from a menu.""" img = emu_downloads_menu.select_image(args.arm) or sys.exit(1) emulator = emu_downloads_menu.select_emulator() or sys.exit(1) cfg = DockerConfig() metrics = False if not cfg.decided_on_metrics(): cfg.set_collect_metrics( click.confirm( "Would you like to help make the emulator better by sending usage statistics to Google upon (graceful) emulator exit?" )) metrics = cfg.collect_metrics() img_zip = img.download() emu_zip = emulator.download("linux") device = DockerDevice(emu_zip, img_zip, args.dest, args.gpu) device.create_docker_file(args.extra, metrics) img = device.create_container() if img and args.start: device.launch(img)