Updated info in README.md

This commit is contained in:
Giancarlo Panichi 2023-05-18 19:21:10 +02:00
parent 86b332aa48
commit 10b961a5f2
1 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,7 @@ Starting from this example, you can first create a docker image in which it is i
The image created in this way can be executed in a container with the following command:
```
$ docker run -i -t --rm --name simpleobis-cont simpleobis /bin/sh -c '/usr/bin/Rscript --vanilla simpleobisCCP.R "Sarda sarda" "POLYGON((-5.657713322217344 45.88175260533238,38.99072417778265 45.88175260533238,38.99072417778265 29.60135866020714,-5.657713322217344 29.60135866020714,-5.657713322217344 45.88175260533238))"'
$ docker run -i -t --rm --name simpleobis-cont simpleobis /bin/sh -c '/bin/mkdir /ccp_data ;/usr/bin/Rscript --vanilla simpleobisCCP.R "Sarda sarda" "POLYGON((-5.657713322217344 45.88175260533238,38.99072417778265 45.88175260533238,38.99072417778265 29.60135866020714,-5.657713322217344 29.60135866020714,-5.657713322217344 45.88175260533238))"'
```
@ -19,10 +19,18 @@ You can also run it directly from the container shell:
```
$ docker run -i -t --rm --name simpleobis-cont simpleobis sh
root@7f371ac6f420:/# Rscript --vanilla simpleobisCCP.R "Sarda sarda" "POLYGON((-5.657713322217344 45.88175260533238,38.99072417778265 45.88175260533238,38.99072417778265 29.60135866020714,-5.657713322217344 29.60135866020714,-5.657713322217344 45.88175260533238))"
# mkdir /ccp_data
# Rscript --vanilla simpleobisCCP.R "Sarda sarda" "POLYGON((-5.657713322217344 45.88175260533238,38.99072417778265 45.88175260533238,38.99072417778265 29.60135866020714,-5.657713322217344 29.60135866020714,-5.657713322217344 45.88175260533238))"
```
Note in the examples above we added the /ccp_app folder to test the created image locally. In reality this is created by the CCP service and therefore in production there is no need to do it so the command would be like this for integration:
```
/bin/sh -c '/usr/bin/Rscript --vanilla simpleobisCCP.R "{{sname}}" "{{usedPolygon}}"'
```
To be able to create an image from this application you need to have Docker and Docker-Compose installed on your machine and the relative python packages, see:
[Docker](https://docs.docker.com/engine/),
[Docker-Compose](https://docs.docker.com/compose/install/) and