Launch DeepCode CLI inside Docker container
()
| 521 | |
| 522 | |
| 523 | def launch_docker_cli(): |
| 524 | """Launch DeepCode CLI inside Docker container""" |
| 525 | current_dir, compose_file, compose_args = _check_docker_prerequisites() |
| 526 | |
| 527 | print("š„ļø Starting DeepCode CLI in Docker...") |
| 528 | print("=" * 50) |
| 529 | |
| 530 | try: |
| 531 | # Check if image exists (auto-build on first run) |
| 532 | result = subprocess.run( |
| 533 | compose_args + ["images", "-q"], capture_output=True, text=True |
| 534 | ) |
| 535 | if not result.stdout.strip(): |
| 536 | print( |
| 537 | "š¦ First run detected ā building Docker image (may take a few minutes)..." |
| 538 | ) |
| 539 | subprocess.run(compose_args + ["build"], check=True) |
| 540 | |
| 541 | # Run CLI interactively |
| 542 | subprocess.run( |
| 543 | compose_args + ["run", "--rm", "-it", "deepcode", "cli"], check=True |
| 544 | ) |
| 545 | |
| 546 | except subprocess.CalledProcessError as e: |
| 547 | print(f"\nā Docker failed: {e}") |
| 548 | sys.exit(1) |
| 549 | except KeyboardInterrupt: |
| 550 | print("\nš Cancelled") |
| 551 | |
| 552 | |
| 553 | def launch_paper_test(paper_name: str, fast_mode: bool = False): |
no test coverage detected