diff --git a/README.md b/README.md index 9227d4c..72cd15c 100644 --- a/README.md +++ b/README.md @@ -10,40 +10,24 @@ From R devtools::install_github("eWaterCycle/bmi-r") ``` -# Usage +For Python runner +```bash +pip install grpc4bmi[R] +``` + +# Serve the model using grpc4bmi First the model should be wrapped in a basic model interface be subclassing the AbstractBmi class. Then the server can be started with: ``` -pip install grpc4bmi[R] -run-bmi-server --lang R --name . +run-bmi-server --lang R --path --name ``` ## Docker container -So for example for https://github.com/ClaudiaBrauer/WALRUS - -```Dockerfile -FROM r-base - -RUN installGithub.r ClaudiaBrauer/WALRUS eWaterCycle/bmi-r +So for example for [WALRUS](https://github.com/ClaudiaBrauer/WALRUS) model, see its [Dockerfile](https://github.com/eWaterCycle/grpc4bmi-examples/blob/master/walrus/Dockerfile). -RUN mkdir /opt/walrus-bmi - -COPY walrus-bmi.r /opt/walrus-bmi/walrus-bmi.r - -WORKDIR /opt/walrus-bmi - -RUN apt update && apt install -y python3-dev python3-pip && pip3 install grpc4bmi[R] -CMD run-bmi-server --lang R --name walrus-bmi.WalrusBmi --path /opt/walrus-bmi --port 55555 -EXPOSE 55555 -``` - -To run server use -```bash -docker run -d -v $PWD:/data -p 55555:55555 -``` The config file for the bmi initialize function should be put in current working directory and the initialize function should be called with `/data/