environmental-modeling-workflows / watershed-workflow

Python workflows for data-rich, hyper-resolution simulations of hydrologic models on watersheds.
Other
66 stars 29 forks source link

Docker installation issue #55

Open lijingwang opened 1 year ago

lijingwang commented 1 year ago

Hi Ethan, I git clone this watershed-workflow repo and followed the instruction of using docker to install this package. I have encountered two issues when I tried to test the notebook.

1.

 ---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [2], in <cell line: 7>()
      5 import watershed_workflow.plot
      6 import watershed_workflow.mesh
----> 7 import watershed_workflow.densification
      8 import watershed_workflow.condition
      9 watershed_workflow.ui.setup_logging(1,None)

ModuleNotFoundError: No module named 'watershed_workflow.densification'

2.

 ---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [5], in <cell line: 13>()
     10 watershed_orig=copy.deepcopy(watershed) # keeping the original
     12 # simplify the geometry for a "nicer" discrete object
---> 13 watershed_workflow.simplify(watershed, rivers, simplify_rivers=10,
     14                             snap_rivers=True, cut_intersections=True)
     16 # for plotting purpose
     17 rivers_simplified=[river.deep_copy() for river in rivers] 

TypeError: simplify() got an unexpected keyword argument 'snap_rivers'

Since the watershed-workflow can be imported but just two problems on the functions, I am guessing that might be some version issues where I shouldn't clone the lastest package. Any suggestions? Thank you!

lijingwang commented 1 year ago

I followed the instruction online but I documented every step that I did. LINK this might be helpful for anyone else in the future and debug.

pinshuai commented 1 year ago

You may want to try this older version of the meshing workflow. It should work with the docker.

From what I can tell, the repo is up to date but the docker image is not.

lijingwang commented 1 year ago

Thank you Pin! I use the local installation and it works perfectly. I hope the docker environment can be updated soon!

pinshuai commented 1 year ago

If you really want to use the Docker, you can also update the watershed-workflow source code inside the docker container using 'git pull'. This way, you don't have to install all the dependencies (e.g., Exodus) locally, which could be challenging.

ecoon commented 1 year ago

I will update the docker image. I'm not sure why it isn't!

lijingwang commented 1 year ago

Thank you Ethan! I think that would be really helpful to keep everything the same version.

I recently realized my note on how to install watershed-workflow might be helpful for others.

Here is the instruction for users who want to install watershed-workflow locally and also there is instructions for Exodus installation too.

Local installation for watershed-workflow. Hope that helps the community!

Best, Lijing.