Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hype docker image gives an error #5

Open
SarahAlidoost opened this issue Jun 7, 2022 · 1 comment
Open

Hype docker image gives an error #5

SarahAlidoost opened this issue Jun 7, 2022 · 1 comment

Comments

@SarahAlidoost
Copy link

The hype notebook using docker image gives the error (the singularity works fine):

--------------------------------------------------------------------------
DeadContainerException                    Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 cfg_file, cfg_dir = model.setup()
      2 cfg_file, cfg_dir

File ~/GitHub/ewatercycle/src/ewatercycle/models/hype.py:152, in Hype.setup(self, start_time, end_time, crit_time, cfg_dir)
    150 # start container
    151 work_dir = str(cfg_dir_as_path)
--> 152 self.bmi = _start_container(self.version, work_dir)
    154 return str(cfg_file), work_dir

File ~/GitHub/ewatercycle/src/ewatercycle/models/hype.py:217, in _start_container(version, work_dir)
    215 elif CFG["container_engine"].lower() == "docker":
    216     image = _version_images[version]["docker"]
--> 217     return BmiClientDocker(
    218         image=image,
    219         image_port=55555,  # TODO needed?
    220         work_dir=work_dir,
    221     )
    222 else:
    223     raise ValueError(
    224         f"Unknown container technology in CFG: {CFG['container_engine']}"
    225     )

File ~/mambaforge/envs/ewatercycle/lib/python3.10/site-packages/grpc4bmi/bmi_client_docker.py:88, in BmiClientDocker.__init__(self, image, work_dir, image_port, host, input_dirs, user, remove, delay, timeout)
     86         logs = self.logs()
     87         msg = f'Failed to start Docker container with image {image}, Container log: {logs}'
---> 88         raise DeadContainerException(msg, exitcode, logs)
     90 super(BmiClientDocker, self).__init__(BmiClient.create_grpc_channel(port=port, host=host), timeout=timeout)

DeadContainerException: Failed to start Docker container with image ewatercycle/hype-grpc4bmi:feb2021, Container log: terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
@sverhoeven
Copy link
Member

Able to reproduce by running

docker run -ti --rm ewatercycle/hype-grpc4bmi:feb2021
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)

Needs to be fixed in https://github.com/eWaterCycle/hype-bmi

@BSchilperoort BSchilperoort transferred this issue from eWaterCycle/ewatercycle Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants