eWaterCycle / grpc4bmi

gRPC wrapper for model with a Basic modeling interface
https://grpc4bmi.readthedocs.io
Apache License 2.0
5 stars 4 forks source link

More explanation needed in docs #149

Open Daafip opened 7 months ago

Daafip commented 7 months ago

Trying to create my own eWaterCycle plugin with a known working BMI-model was fairly doable as a somewhat tech-savy MSc student.

I got stuck after on the building page.

Creating a server and running the BMI this way worked fine.

The main issue was getting docker up and running on window 10, so maybe a more in depth guide in future for novel users?

My work flow after googling and error solving was (I can add a guide to docs later maybe?).

running worked but then building had some issues

added to ensure we have pip

ARG APP_IMAGE=python:3.8 WORKDIR /app ADD . /app RUN set -xe \ && apt-get -yqq update \ && apt-get -yqq install python3-pip \ && pip3 install --upgrade pip\ && apt-get install -y git

Install grpc4bmi

RUN pip install git+https://github.com/eWaterCycle/grpc4bmi.git#egg=grpc4bmi

Install here your BMI model:

RUN git clone https://github.com/Daafip/HBV-bmi-numpy /opt/mymodeldir

Run bmi server

ENTRYPOINT ["run-bmi-server", "--name", "HBV.HBV_bmi.HBV",--path,"/opt/mymodeldir"]

Expose the magic grpc4bmi port

EXPOSE 55555

Daafip commented 7 months ago

Using the template from the leaky bucket fixed it! My main issue was that it needs to be pip installable for the docker. Following the format of leakybucket fixed that. I could get it working locally but wasn't in teh right format for pip install. Maybe a few checks somewhere? like can be installed with pip for python? - but as you said still quite technical