-
Notifications
You must be signed in to change notification settings - Fork 241
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
Dockerize basgra #2566
Dockerize basgra #2566
Conversation
Q: Documentation says "It is important values for If the former, I had
In that case, original record is on BU servers, should I change the record there and wait for it to propagate and/or change locally? |
Looks like M models/basgra/man/run_BASGRA.Rd has changed:
|
Co-Authored-By: Rob Kooper <kooper@illinois.edu>
Co-Authored-By: Rob Kooper <kooper@illinois.edu>
Co-Authored-By: Rob Kooper <kooper@illinois.edu>
…dockerize_basgra merge
@infotroph do I need to change Rcheck_reference.log to pass travis?
|
@robkooper thanks a lot for the review and suggestions. I am now able to run docker.sh with the As I didn't specify any But I'm still not sure how to run the model in practice. It doesn't show up on the web interface. Documentation says "The PEcAn code will use these to register the model with the BETY database" but at which stage this happens? (I didn't rebuild bety image, so all my other containers have
|
Is this the correct way to add basgra to docker-compose.yml?
Or is this not the way to go at all, beacuse basgra code is compiled with pecan code? |
That should be correct. For the model registration to work you need the following pieces running:
Each model will send out a heartbeat every 5 minutes using rabbutnq. This heartbeat contains the model_info.json. Anybody can listen to these heartbeats and see what models are active. So from startup to actual registration it might take about 5 minutes, you should be able to see all models as well at: http://server:9999, or http://server/monitor |
I think you can handle the new complaints by creating an ...While I'm thinking about it: Are we expecting all models to have a |
@infotroph thanks, I'll try to fix that tomorrow @robkooper thanks, looks like my monitor currently keeps restarting, meaning it keeps going down? I'll try to see why (hint: it still happens when I remove basgra section from my docker-compose.yml, but it restarts and stays up when I comment out |
What do you see when you type |
Here are the log files in my cases: OK.log: when monitor container stays up (but there are still errors, e.g. NOTOK.log: when monitor keeps restarting. I guess in this one the main problem is:
Looking at previous version of monitor.py there used to be a FIX.log is what I get after Not sure what to do about this invalid port number issue:
Not sure if relevant but this is what I had in my docker-compose.override.yml:
Also could be related, I'm not sure why, but after I rebuilt images my bety container name became something like Btw, is this a typo? |
to work around this
recreated the image ( But where is the code supposed to get this |
After going back to original volume and keeping the changes I made to the monitor.py, I created the basgra image and rebuilt all the images and the whole stack. Now basgra show up in the drop down menu, record gets inserted into the DB (I can now check it from the bety web interface as well 👍) I got some errors in the met.process which may or maynot be related to docker, I'll dig deeper later. But then put some already processed met files to an acessible path, just to move along the workflow.
there is no edit: it's a bit weird, I was trying to run it through RStudio, and when I navigate there to |
sender.py should come from pecan/models docker image. |
I am not sure if I follow what you mean by
I have a successful run when I give the same exact .xml through the web interface, then I open Rstudio, navigate to the output dir, e.g. |
…dockerize_basgra merge
I guess this PR in itself is complete, in practice I was able to get a successful run from the web interface. Looks like permission issues need to have their own PR. This PR also fixes and closes the monitor bugs (if these are the fixes we want) One question tho: should I leave basgra in the docker-compose.yml? Will the basgra image be available once this PR goes in or should I push it somehow separately? (currently I built the image locally) I also don't see biocro on the docker-compose.yml |
@@ -258,6 +258,19 @@ services: | |||
# PEcAn models, list each model you want to run below | |||
# ---------------------------------------------------------------------- | |||
|
|||
# PEcAn basgra model runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is fine to have it here since the image will automagically be build by the docker.sh file that is part of the pull request.
# Setup model_info file | ||
COPY model_info.json /work/model.json | ||
RUN sed -i -e "s/@VERSION@/${MODEL_VERSION}/g" \ | ||
-e "s#@BINARY@#/usr/local/lib/R/site-library/PEcAn.BASGRA/libs/PEcAn.BASGRA.so#g" /work/model.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably want to figure out a better way to do the binaries for models that are in R.
], | ||
"inputs": {}, | ||
"bibtex": [ | ||
"Hoglind M, van Oijen M, Cameron D, Persson T (2016) Process-based simulation of growth and overwintering of grassland using the BASGRA model. Ecological Modelling 335:1-15.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glad this is used, need to figure out a better way to show this in the interface in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an entry to ChangeLog.md, otherwise it is good to go.
@istfer Going to squash the pull request and merge it if that is ok so we end up with a single commit instead of many commits. |
that's perfectly fine |
Description
I want to work with BASGRA in the docker version. As explained here, BASGRA code lives in the PEcAn package.
I made these changes and rebuild the images locally (successfully). Not sure if it means everything will work as expected, but I don't know how to proceed to test.
Review Time Estimate
Types of changes
Checklist: