From 7e24a17ad3f89e9f1f4a9d2e55b77e266b65b587 Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Mon, 21 Nov 2022 15:57:00 -0700 Subject: [PATCH 1/4] Gdal update for new Ubuntu --- .github/workflows/testing_checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing_checks.yaml b/.github/workflows/testing_checks.yaml index 53e135c..586c170 100644 --- a/.github/workflows/testing_checks.yaml +++ b/.github/workflows/testing_checks.yaml @@ -64,7 +64,7 @@ jobs: run: 'python3 -m pip install --upgrade --no-cache-dir numpy wheel requests' - name: Install Python pygdal shell: bash - run: 'python3 -m pip install --no-cache-dir pygdal==3.0.4.*' + run: 'python3 -m pip install --no-cache-dir pygdal==3.4.1.*' - name: Install system requirements from source shell: bash run: 'if [ -s "packages.txt" ]; then (cat packages.txt | sudo xargs apt-get install -y --no-install-recommends) || (echo "Failed to install additional packages" && exit 1); fi' From 02757e223dfa108aff9e636e8b4dd610615e9d18 Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Mon, 21 Nov 2022 16:04:50 -0700 Subject: [PATCH 2/4] Update Ubuntu version --- .github/workflows/docker_build_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build_test.yaml b/.github/workflows/docker_build_test.yaml index 2a41f39..fc30655 100644 --- a/.github/workflows/docker_build_test.yaml +++ b/.github/workflows/docker_build_test.yaml @@ -17,7 +17,7 @@ on: jobs: app_testing: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: Test simple apps (not workflow apps) strategy: fail-fast: false From d2d1dcc40a7b22febbae22c0cf398a4da1c2a59e Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Mon, 21 Nov 2022 19:14:04 -0700 Subject: [PATCH 3/4] Changes for Ubuntu 22.04 --- Dockerfile | 49 ++++---- .../canopycover_v0.0.1_ubuntu22.04.scif | 36 ++++++ scif_app_recipes/git_v0.0.1_ubuntu22.04.scif | 29 +++++ .../greenness_v0.0.1_ubuntu22.04.scif | 43 +++++++ .../ndcctools_v7.1.2_ubuntu22.04.scif | 116 ++++++++++++++++++ .../plotclip_v0.0.1_ubuntu22.04.scif | 36 ++++++ .../soilmask_ratio_v0.0.1_ubuntu22.04.scif | 37 ++++++ .../soilmask_v0.0.1_ubuntu22.04.scif | 37 ++++++ 8 files changed, 360 insertions(+), 23 deletions(-) create mode 100644 scif_app_recipes/canopycover_v0.0.1_ubuntu22.04.scif create mode 100644 scif_app_recipes/git_v0.0.1_ubuntu22.04.scif create mode 100644 scif_app_recipes/greenness_v0.0.1_ubuntu22.04.scif create mode 100644 scif_app_recipes/ndcctools_v7.1.2_ubuntu22.04.scif create mode 100644 scif_app_recipes/plotclip_v0.0.1_ubuntu22.04.scif create mode 100644 scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu22.04.scif create mode 100644 scif_app_recipes/soilmask_v0.0.1_ubuntu22.04.scif diff --git a/Dockerfile b/Dockerfile index 95c9b20..f38037b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,19 @@ -FROM ubuntu:20.04 as base +FROM ubuntu:22.04 as base ENV DOCKER_IMAGE agdrone/drone-workflow:1.1 ENV DEBIAN_FRONTEND noninteractive WORKDIR / # Install Python RUN apt-get update -y \ + && apt-get install -y software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa -y \ + && apt-get update -y \ && apt-get install --no-install-recommends -y \ git \ python3.8 \ + python3.8-distutils \ python3-pip \ + && rm -f /usr/bin/python3 && ln -s /usr/bin/python3.8 /usr/bin/python3 \ && ln -s /usr/bin/python3 /usr/bin/python \ && python3.8 -m pip install -U pip \ && apt-get autoremove -y \ @@ -44,7 +49,6 @@ RUN apt-get update && \ libgdal-dev \ gcc \ g++ \ - python-dev \ python3-dev \ python3.8-dev \ curl && \ @@ -53,7 +57,7 @@ RUN apt-get update && \ python3.8 -m pip install --upgrade --no-cache-dir \ influxdb matplotlib Pillow pip piexif python-dateutil pyyaml scipy utm numpy cryptography PDAL==2.3.6 && \ python3.8 -m pip install --upgrade --no-cache-dir \ - pygdal==3.0.4.* && \ + pygdal==3.4.1.* && \ python3 -m pip install --upgrade --no-cache-dir \ agpypeline && \ python3.8 -m pip install --upgrade --no-cache-dir \ @@ -85,12 +89,11 @@ RUN apt-get update -y && \ curl \ gnupg-agent \ software-properties-common && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ - apt-key fingerprint 0EBFCD88 && \ - add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" && \ + mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg && \ + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ apt-get update && \ apt-get install -y --no-install-recommends \ docker-ce \ @@ -117,22 +120,22 @@ COPY ./scif_app_recipes/opendronemap_v2.2.scif /opt/ RUN scif install /opt/opendronemap_v2.2.scif FROM odm_scif as combined_scif -COPY ./scif_app_recipes/ndcctools_v7.1.2_ubuntu20.04.scif /opt/ -COPY ./scif_app_recipes/soilmask_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/soilmask_v0.0.1_ubuntu20.04.scif -RUN scif install /opt/ndcctools_v7.1.2_ubuntu20.04.scif +COPY ./scif_app_recipes/ndcctools_v7.1.2_ubuntu22.04.scif /opt/ +COPY ./scif_app_recipes/soilmask_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/soilmask_v0.0.1_ubuntu22.04.scif +RUN scif install /opt/ndcctools_v7.1.2_ubuntu22.04.scif -COPY ./scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/soilmask_ratio_v0.0.1_ubuntu20.04.scif +COPY ./scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/soilmask_ratio_v0.0.1_ubuntu22.04.scif -COPY ./scif_app_recipes/plotclip_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/plotclip_v0.0.1_ubuntu20.04.scif +COPY ./scif_app_recipes/plotclip_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/plotclip_v0.0.1_ubuntu22.04.scif -COPY ./scif_app_recipes/canopycover_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/canopycover_v0.0.1_ubuntu20.04.scif +COPY ./scif_app_recipes/canopycover_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/canopycover_v0.0.1_ubuntu22.04.scif -COPY ./scif_app_recipes/greenness_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/greenness_v0.0.1_ubuntu20.04.scif +COPY ./scif_app_recipes/greenness_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/greenness_v0.0.1_ubuntu22.04.scif COPY *.jx *.py *.sh jx-args.json /scif/apps/src/ COPY plantit-workflow.sh /opt/dev/plantit-workflow.sh @@ -140,8 +143,8 @@ RUN chmod a+x /scif/apps/src/*.sh && \ chmod a+x /scif/apps/src/*.py && \ chmod a+x /opt/dev/plantit-workflow.sh -COPY ./scif_app_recipes/git_v0.0.1_ubuntu20.04.scif /opt/ -RUN scif install /opt/git_v0.0.1_ubuntu20.04.scif +COPY ./scif_app_recipes/git_v0.0.1_ubuntu22.04.scif /opt/ +RUN scif install /opt/git_v0.0.1_ubuntu22.04.scif # Silence a git warning RUN git config --global advice.detachedHead false diff --git a/scif_app_recipes/canopycover_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/canopycover_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..0d48dbc --- /dev/null +++ b/scif_app_recipes/canopycover_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,36 @@ +%appinstall canopycover + # Download canopycover code. In the future use pip/conda install. + wget -O canopycover.tar.gz https://github.com/AgPipeline/transformer-canopycover/archive/v1.8.tar.gz + tar xvf canopycover.tar.gz + mv transformer-canopycover-1.8 src + echo "Removing unneeded files" + rm -rf --verbose src/test_data src/tests src/.github canopycover.tar.gz + + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run canopycover\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 src/canopycover.py --help >> "${PWD}/scif/runscript.help" + +%apprun canopycover + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --jx-args="/scif/apps/src/canopy_cover_files.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/canopycover_workflow.jx" + +%apphelp canopycover + This app provides an entrypoint to the canopycover tool diff --git a/scif_app_recipes/git_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/git_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..b826326 --- /dev/null +++ b/scif_app_recipes/git_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,29 @@ +%appinstall git_rgb_plot + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir opencv-contrib-python-headless agpypeline + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run git\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 /scif/apps/src/git_algo_rgb_plot.py --help >> "${PWD}/scif/runscript.help" + +%apprun git_rgb_plot + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --jx-args="/scif/apps/src/git_rgb_plot_files.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/git_rgb_plot_workflow.jx" + +%apphelp git_rgb_plot + This app provides an entrypoint to the git tool diff --git a/scif_app_recipes/greenness_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/greenness_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..d4b5b05 --- /dev/null +++ b/scif_app_recipes/greenness_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,43 @@ +%appinstall greenness-indices + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + + # Download plot-base-rgb code + wget -O plot_base_rgb.tar.gz https://github.com/AgPipeline/plot-base-rgb/archive/v1.10.tar.gz + tar xvf plot_base_rgb.tar.gz + mv plot-base-rgb-1.10 src + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + + # Download greenness-indices code. In the future use pip/conda install. + wget -O greenness_indices.tar.gz https://github.com/AgPipeline/transformer-rgb-indices/archive/v1.4.tar.gz + tar xvf greenness_indices.tar.gz + cp -r transformer-rgb-indices-1.4/* src/ + rm -r transformer-rgb-indices-1.4 + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + echo "Removing unneeded files" + rm -rf --verbose src/test_data src/tests src/.github plot_base_rgb.tar.gz greenness_indices.tar.gz + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run greenness-indices\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 src/transformer.py --help >> "${PWD}/scif/runscript.help" + +%apprun greenness-indices + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --jx-args="/scif/apps/src/greenness-indices_files.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/greenness-indices_workflow.jx" + +%apphelp greenness-indices + This app provides an entrypoint to the greenness-indices tool diff --git a/scif_app_recipes/ndcctools_v7.1.2_ubuntu22.04.scif b/scif_app_recipes/ndcctools_v7.1.2_ubuntu22.04.scif new file mode 100644 index 0000000..6187cf5 --- /dev/null +++ b/scif_app_recipes/ndcctools_v7.1.2_ubuntu22.04.scif @@ -0,0 +1,116 @@ + +%appinstall betydb2geojson + # Install dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir requests pygdal==3.4.1.* + +%apprun betydb2geojson + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/betydb2geojson_workflow.jx" + +%apphelp betydb2geojson + This app provides a conversion from BETYdb site data to GeoJSON plot geometries. + + Expected keys in the "jx-args.json" file: + BETYDB_URL - the value is the URL of the BETYdb instance to get plot geometries from + PLOT_SHAPEFILE - the path to save the GeoJSON to + + Sample command: + scif run betydb2geojson + + See also: + https://github.com/AgPipeline/drone-makeflow/blob/master/README.md + +%appinstall shp2geojson + # Install dependencies + +%apprun shp2geojson + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/shp2geojson_workflow.jx" + +%apphelp shp2geojson + This app provides a conversion from a shapefile to GeoJSON plot geometries. + + Expected keys in the "jx-args.json" file: + PLOT_GEOMETRY_FILE - the path to the shapefile to convert to GeoJSON + PLOT_SHAPEFILE - the path to save the GeoJSON to + + Sample command: + scif run shp2geojson + + See also: + https://github.com/AgPipeline/drone-makeflow/blob/master/README.md + +%appinstall merge_csv + # Install dependencies + +%apprun merge_csv + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/merge_csv_workflow.jx" + +%apphelp merge_csv + This app searches folders for CSV files and merges them by file name into the output folder + + Expected keys in the "jx-args.json" file: + MERGECSV_SOURCE - the folder path to look for CSV file + MERGECSV_TARGET - the folder path to save the merged CSV files to + MERGECSV_OPTIONS - options for processing CSV files; set to "--help" to display all available options without processing files + + Sample command: + scif run merge_csv + + See also: + https://github.com/AgPipeline/drone-makeflow/blob/master/README.md + +%appinstall find_files2json + # Install dependencies + +%apprun find_files2json + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/find_files2json_workflow.jx" + +%apphelp find_files2json + This app searches folders for files and writes out a JSON file intended to be used as input to a workflow. + The search assumes the wanted files are located in subfolders off the FILES2JSON_SEARCH_FOLDER. + If no files matching the search name are found then no JSON file is saved. + + Expected keys in the "jx-args.json" file: + FILES2JSON_SEARCH_NAME - the name of the files to locate + FILES2JSON_SEARCH_FOLDER - the path to the folder to search within + FILES2JSON_JSON_FILE - the path to the JSON file to write found files to + + Sample command: + scif run find_files2json diff --git a/scif_app_recipes/plotclip_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/plotclip_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..9cec12b --- /dev/null +++ b/scif_app_recipes/plotclip_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,36 @@ +%appinstall plotclip + # Download plotclip code. In the future use pip/conda install. + wget -O plotclip.tar.gz https://github.com/AgPipeline/transformer-plotclip/archive/v2.7.tar.gz + tar xvf plotclip.tar.gz + mv transformer-plotclip-2.7 src + echo "Removing unneeded files" + rm -rf --verbose src/test_data src/tests src/.github plotclip.tar.gz + + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pyyaml piexif + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run plotclip\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 src/plotclip.py --help >> "${PWD}/scif/runscript.help" + +%apprun plotclip + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/plotclip_workflow.jx" + +%apphelp plotclip + This app provides an entrypoint to the plotclip tool diff --git a/scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..1563703 --- /dev/null +++ b/scif_app_recipes/soilmask_ratio_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,37 @@ +%appinstall soilmask_ratio + # Download soilmask ratio code. In the future use pip/conda install. + wget -O soilmask_ratio.tar.gz https://github.com/AgPipeline/transformer-soilmask-by-ratio/archive/v1.2.tar.gz + tar xvzf soilmask_ratio.tar.gz + mv transformer-soilmask-by-ratio-1.2 src + echo "Removing unneeded files" + rm -rf --verbose src/test_data src/tests src/.github src/figures soilmask_ratio.tar.gz + + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + .venv/bin/python3 -m pip install --upgrade --no-cache-dir scikit-image + .venv/bin/python3 -m pip install --upgrade --no-cache-dir opencv-python certifi + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run soilmask_ratio\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 src/transformer.py --help >> "${PWD}/scif/runscript.help" + +%apprun soilmask_ratio + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/soilmask_ratio_workflow.jx" + +%apphelp soilmask_ratio + This app provides an entrypoint to the soilmask_ratio tool diff --git a/scif_app_recipes/soilmask_v0.0.1_ubuntu22.04.scif b/scif_app_recipes/soilmask_v0.0.1_ubuntu22.04.scif new file mode 100644 index 0000000..21af76a --- /dev/null +++ b/scif_app_recipes/soilmask_v0.0.1_ubuntu22.04.scif @@ -0,0 +1,37 @@ +%appinstall soilmask + # Download soilmask code. In the future use pip/conda install. + wget -O soilmask.tar.gz https://github.com/AgPipeline/transformer-soilmask/archive/v2.4.tar.gz + tar xvzf soilmask.tar.gz + mv transformer-soilmask-2.4 src + echo "Removing unneeded files" + rm -rf --verbose src/test_data src/tests src/.github src/figures soilmask.tar.gz + + # Install Makeflow and other dependencies + python3.8 -m venv --system-site-packages .venv + .venv/bin/python3 -m pip install --upgrade --no-cache-dir pip + .venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" + .venv/bin/python3 -m pip install --upgrade --no-cache-dir opencv-python scikit-image certifi + + + # Add example Docker command to SCIF app help section + if [ -n $DOCKER_IMAGE ]; then + echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run soilmask\n" >> "${PWD}/scif/runscript.help" + fi + + # Generate remainder of SCIF app help section by running main script + .venv/bin/python3 src/soilmask.py --help >> "${PWD}/scif/runscript.help" + +%apprun soilmask + /cctools/bin/makeflow \ + --jx \ + --jx-args="/scif/apps/src/jx-args.json" \ + --log-verbose \ + --retry-count=1 \ + --change-directory="${SCIF_APPDATA}" \ + --makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ + --batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ + ${1} \ + "/scif/apps/src/soilmask_workflow.jx" + +%apphelp soilmask + This app provides an entrypoint to the soilmask tool From b64c50e248a952dffdca43a1570a6a8023dd8a5b Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Tue, 22 Nov 2022 12:15:43 -0700 Subject: [PATCH 4/4] Updating test data --- .github/workflows/docker_build_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build_test.yaml b/.github/workflows/docker_build_test.yaml index fc30655..07db52d 100644 --- a/.github/workflows/docker_build_test.yaml +++ b/.github/workflows/docker_build_test.yaml @@ -26,13 +26,13 @@ jobs: include: - app: betydb2geojson parameter_json: .github/workflows/app_testing.json - test_data_tar_gz: https://data.cyverse.org/dav-anon/iplant/projects/aes/cct/diag/ci/ci_docker_test_data_9.tar.gz + test_data_tar_gz: https://data.cyverse.org/dav-anon/iplant/projects/aes/cct/diag/ci/ci_docker_test_data_10.tar.gz test_results: if [[ -f "outputs/plots.geojson" ]]; then echo "Test betydb2geojson success"; exit 0; else echo "App failed - betydb2geojson"; exit 1; fi; test_results_quality: ./tests/compare_geojson.py './test_data/plots_betydb.geojson' './outputs/plots.geojson' - app: shp2geojson tar_gz_file: https://de.cyverse.org/dl/d/3C8A23C0-F77A-4598-ADC4-874EB265F9B0/scif_test_data.tar.gz parameter_json: .github/workflows/app_testing.json - test_data_tar_gz: https://de.cyverse.org/dl/d/7AE4F4C8-5F40-4B56-91F3-127678EC58C0/ci_docker_test_data_4.tar.gz + test_data_tar_gz: https://data.cyverse.org/dav-anon/iplant/projects/aes/cct/diag/ci/ci_docker_test_data_10.tar.gz test_results: if [[ -f "outputs/plots.geojson" ]]; then echo "Test shp2geojson success"; exit 0; else echo "App failed - shp2geojson"; exit 1; fi; test_results_quality: ./tests/compare_geojson.py './test_data/plots_shapefile.geojson' './outputs/plots.geojson' - app: soilmask