You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Giancarlo Panichi 4d870d2bdc Merge pull request 'Aggiornare 'simpleobismapsCCP.R'' (#1) from m.lettere/simpleobismaps:reduceout into master
Reviewed-on: #1
11 months ago
.settings First commit 11 months ago
.project First commit 11 months ago
Dockerfile First commit 11 months ago
FUNDING.md First commit 11 months ago
LICENSE.md First commit 11 months ago
README.md Updated info in README.md 11 months ago
fishScientificName.csv First commit 11 months ago
simpleobismapsCCP.R Aggiornare 'simpleobismapsCCP.R' 11 months ago

README.md

SimpleOBISMaps

SimpleOBISMaps is an example written in R that allows you to create a set of maps packaged in a zip file called maps.zip. This maps describe the occurrences present in OBIS starting from a file that contains the scientific names and a polygon.

Starting from this example, you can first create a docker image in which it is installed the file simpleobismapsCCP.R.

The image created in this way can be executed in a container with the following command:

$ docker run -i -t --rm --name simpleobismaps-cont simpleobismaps /bin/sh -c '/bin/mkdir /ccp_data ;/usr/bin/Rscript --vanilla simpleobismapsCCP.R "https://data.d4science.net/Y8WK" "POLYGON((-5.657713322217344 45.88175260533238,38.99072417778265 45.88175260533238,38.99072417778265 29.60135866020714,-5.657713322217344 29.60135866020714,-5.657713322217344 45.88175260533238))"'


You can also run it directly from the container shell:

$ docker run -i -t --rm --name simpleobismaps-cont simpleobismaps sh

# mkdir /ccp_data
# Rscript --vanilla simpleobismapsCCP.R "https://data.d4science.net/Y8WK" "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 simpleobismapsCCP.R "{{url}}" "{{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, Docker-Compose and

Useful Commands

Create Docker Image

docker build -t simpleobismaps .

Save Docker Image in file

docker save simpleobismaps | gzip > simpleobismaps.tar.gz

Publish Docker Image on DockerHub

Re-tagging an existing local image:

docker tag simpleobismaps <hub-user>/<repo-name>[:<tag>]

Login in DockerHub(use your Docker ID):

docker login

Now you can push this repository to the registry designated by its name or tag:

docker push <hub-user>/<repo-name>:<tag>

Then logout for security:

docker logout

Authors

License

This project is licensed under the EUPL V.1.1 License - see the LICENSE.md file for details.

About the gCube Framework

This software is part of the gCubeFramework: an open-source software toolkit used for building and operating Hybrid Data Infrastructures enabling the dynamic deployment of Virtual Research Environments by favouring the realisation of reuse oriented policies.

The projects leading to this software have received funding from a series of European Union programmes see FUNDING.md