eWaterCycle / eWaterCycle/grpc4bmi

Mount dir inside container same as outside + have work directory.

Open
#93 4 comments 0 reactions 1 assignee Claimed by @sverhoeven View on GitHub
Dominant language
Python
Stars
5
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The config file outside the container uses path which resolve on the host machine. Inside the container this path needs to mapped to `/data/input`. It would be nice if inside the container the same paths can be used.

Something like
```python
client = BmiClientSingularity(image, input_dir='/shared/wflow/model-parameters', work_dir='/tmp/wflow-2000-2010')
client.initialize('wflow_sbm.ini')
client.update_until(client.get_end_time())
del client
```

Inside the container you would have
- `/shared/wflow/model-parameters` is mounted as `/shared/wflow/model-parameters` and `/tmp/wflow-2000-2010` is mounted as '/tmp/wflow-2000-2010'
- `/shared/wflow/model-parameters` directory with big parameter set for model
- '/tmp/wflow-2000-2010/wflow_sbm.ini config file for run

After model has run outside container you could have model output like logs for example `/tmp/wflow-2000-2010/wflow.log`.

Pros:
- inside/outside is same so less confusion
- use work_dir='.' to use same current working directory inside and outside container

Cons:
- paths in config file depend on machine, while before they could always use `/data/input`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.