natcap / devstack

Python tools for common natcap applications.
Other
1 stars 1 forks source link

Improve Readme documentation #2

Open dcdenu4 opened 1 year ago

dcdenu4 commented 1 year ago

When trying out the container for a demo I ran into a few issues that I think would be really complicated for someone not familiar with Docker. I pulled the container and attempted to run my script, which takes command line input, like follows:

docker run --rm -ti -v %CD%:/natcap ghcr.io/natcap/devstack:latest python3 gef-rapid-es-assessments\scripts\landcover-transition\lulc-transition.py -f before-lulc.tif -t after-lulc.tif -o .\natcap\

This failed with:

python3: can't open file '/natcap/gef-rapid-es-assessments\\scripts\\landcover-transition\\lulc-transition.py': [Errno 2] No such file or dire

Then I tried this:

docker run --rm -ti -v %CD%:/natcap -w /natcap ghcr.io/natcap/devstack:latest python3 lulc-transition.py -f ../../../before-lulc.tif -t after-lulc.tif -o .\natcap\

This failed with:

ValueError: Could not open ../../../before-lulc.tif as a gdal.OF_RASTER

Finally, I put my command line inputs in the same place as the script and it worked successfully.

docker run --rm -ti -v %CD%:/natcap -w /natcap ghcr.io/natcap/devstack:latest python3 lulc-transition.py -f before-lulc.tif -t after-lulc.tif -o .\natcap\

So, it would be great to have better documentation about what each part of the docker command is doing and what is expected / assumed for running the script successfully.

I also wonder if we could be more flexible with the docker command.

yash-gupta167 commented 1 year ago

Hey @dcdenu4 , can I work on this issue in improving the documentation?

dcdenu4 commented 1 year ago

Hi @yash-gupta167, if you're interesting in contributing and want to Fork -> PR in some improvements, myself or @phargogh can do the review.

yash-gupta167 commented 1 year ago

3 Hey, I have created a PR for the above documentation issue! Please check it out!