(self)
| 699 | return False |
| 700 | |
| 701 | def run_server(self): |
| 702 | # just run server with system command |
| 703 | # currently we do not load cube |
| 704 | self.check_local_bin() |
| 705 | if not self.use_local_bin: |
| 706 | self.download_bin() |
| 707 | # wait for other process to download server bin |
| 708 | while not os.path.exists(self.server_path): |
| 709 | time.sleep(1) |
| 710 | else: |
| 711 | print("Use local bin : {}".format(self.bin_path)) |
| 712 | #self.check_cuda() |
| 713 | command = "{} " \ |
| 714 | "-enable_model_toolkit " \ |
| 715 | "-inferservice_path {} " \ |
| 716 | "-inferservice_file {} " \ |
| 717 | "-max_concurrency {} " \ |
| 718 | "-num_threads {} " \ |
| 719 | "-port {} " \ |
| 720 | "-precision {} " \ |
| 721 | "-use_calib={} " \ |
| 722 | "-reload_interval_s {} " \ |
| 723 | "-resource_path {} " \ |
| 724 | "-resource_file {} " \ |
| 725 | "-workflow_path {} " \ |
| 726 | "-workflow_file {} " \ |
| 727 | "-bthread_concurrency {} " \ |
| 728 | "-max_body_size {} ".format( |
| 729 | self.bin_path, |
| 730 | self.workdir, |
| 731 | self.infer_service_fn, |
| 732 | self.max_concurrency, |
| 733 | self.num_threads, |
| 734 | self.port, |
| 735 | self.precision, |
| 736 | self.use_calib, |
| 737 | self.reload_interval_s, |
| 738 | self.workdir, |
| 739 | self.resource_fn, |
| 740 | self.workdir, |
| 741 | self.workflow_fn, |
| 742 | self.num_threads, |
| 743 | self.max_body_size) |
| 744 | if self.enable_prometheus: |
| 745 | command = command + \ |
| 746 | "-enable_prometheus={} " \ |
| 747 | "-prometheus_port {} ".format( |
| 748 | self.enable_prometheus, |
| 749 | self.prometheus_port) |
| 750 | if self.request_cache_size > 0: |
| 751 | command = command + \ |
| 752 | "-request_cache_size {} ".format( |
| 753 | self.request_cache_size |
| 754 | ) |
| 755 | |
| 756 | print("Going to Run Comand") |
| 757 | print(command) |
| 758 |
no test coverage detected