From e362f5e917f21ad14b0f23813ea76e55fa68b3b0 Mon Sep 17 00:00:00 2001 From: ranchodeluxe <greg.corradini@gmail.com> Date: Mon, 6 Feb 2023 16:15:51 -0800 Subject: [PATCH] stuff --- .gitlab-ci.yml | 14 -------------- Dockerfile.maap | 5 ----- FireRun.py | 2 +- algorithm_config.bkup | 29 ----------------------------- algorithm_config.yaml | 6 +++--- env-feds.yaml => env-feds.yml | 0 maap_image_build_command.sh | 11 ----------- run_dps.sh | 21 +++++++++++---------- 8 files changed, 15 insertions(+), 73 deletions(-) delete mode 100644 Dockerfile.maap delete mode 100644 algorithm_config.bkup rename env-feds.yaml => env-feds.yml (100%) delete mode 100644 maap_image_build_command.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 243ba2d..2607627 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,17 +28,3 @@ dps-run:fire-atlas-western-us-nrt: USERNAME: ashiklom QUEUE: maap-dps-worker-8gb - -dps-run:fire-atlas-western-us-nrt-build-command-test: - extends: .run_dps_job_base - only: - variables: - - $BUILD_CMD_TEST - variables: - MAAP_IMAGE_ENV: ubuntu - IMAGE_TAG: fire-atlas-${CI_COMMIT_SHORT_SHA} - ALGO_NAME: eis-fire-feds-nrt-dps-build-command - BRANCH_NAME: conus-dps-build-command - USERNAME: ashiklom - QUEUE: maap-dps-worker-8gb - diff --git a/Dockerfile.maap b/Dockerfile.maap deleted file mode 100644 index d0e4a55..0000000 --- a/Dockerfile.maap +++ /dev/null @@ -1,5 +0,0 @@ -FROM docker.io/ashiklom/maap-mamba - -COPY . / - -CMD ["tail", "-f", "/dev/log"] diff --git a/FireRun.py b/FireRun.py index 93dc871..58710b5 100644 --- a/FireRun.py +++ b/FireRun.py @@ -324,7 +324,7 @@ def WesternUSrunNRT(): ctime = datetime.now() - region = ('WesternUSNRT_gcorradini',[-125.698046875,31.676476158707615,-101.00078125,49.51429477264348]) + region = ('WesternUSNRT_DPS',[-125.698046875,31.676476158707615,-101.00078125,49.51429477264348]) lts = FireIO.get_lts_serialization(regnm=region[0]) if lts == None: diff --git a/algorithm_config.bkup b/algorithm_config.bkup deleted file mode 100644 index e2ac355..0000000 --- a/algorithm_config.bkup +++ /dev/null @@ -1,29 +0,0 @@ -# DO NOT DELETE -# THIS CONFIG IS AUTO-GENERATED BY ADE UI - -algo_name: eis-fire-feds-nrt-dps -# Branch or tag -version: conus-dps -environment: ubuntu -repository_url: https://repo.ops.maap-project.org/eorland_gee/fireatlas_nrt.git -# Container used for running -docker_url: "mas.maap-project.org:5000/root/ade-base-images/vanilla:latest" -# queue chosen when registering -queue: "maap-dps-worker-8gb" - -# fill out these fields -# explain what this algorithm does -description: "Map active fire perimeters." -# path to the wrapper script for running the algorithm -# Command starts with repository name -run_command: "fireatlas_nrt/run_dps.sh" -# build_command: my-build-script.sh -# set a storage value in GB or MB or KB, e.g. "100GB", "20MB", "10KB" -disk_space: "10GB" -inputs: -# remove below this line if no inputs -# rename and set algorithm input names accordingly -# - name: path-number -# download: False -# - name: file-to-copy-in -# download: True diff --git a/algorithm_config.yaml b/algorithm_config.yaml index 56b284d..e2ac355 100644 --- a/algorithm_config.yaml +++ b/algorithm_config.yaml @@ -1,9 +1,9 @@ # DO NOT DELETE # THIS CONFIG IS AUTO-GENERATED BY ADE UI -algo_name: eis-fire-feds-nrt-dps-build-command +algo_name: eis-fire-feds-nrt-dps # Branch or tag -version: conus-dps-build-command +version: conus-dps environment: ubuntu repository_url: https://repo.ops.maap-project.org/eorland_gee/fireatlas_nrt.git # Container used for running @@ -17,7 +17,7 @@ description: "Map active fire perimeters." # path to the wrapper script for running the algorithm # Command starts with repository name run_command: "fireatlas_nrt/run_dps.sh" -build_command: "fireatlas_nrt/maap_image_build_command.sh" +# build_command: my-build-script.sh # set a storage value in GB or MB or KB, e.g. "100GB", "20MB", "10KB" disk_space: "10GB" inputs: diff --git a/env-feds.yaml b/env-feds.yml similarity index 100% rename from env-feds.yaml rename to env-feds.yml diff --git a/maap_image_build_command.sh b/maap_image_build_command.sh deleted file mode 100644 index 94d9622..0000000 --- a/maap_image_build_command.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -euxo pipefail -basedir=$( cd "$(dirname "$0")" ; pwd -P ) -mamba env create -f ${basedir}/env-feds.yaml -pushd ${HOME} - -# required to get all the MAAP(y) things -/opt/conda/envs/feds/bin/pip install --user -e git+https://github.com/MAAP-Project/maap-py.git#egg=maappy - -source activate feds -source activate $CONDA_PREFIX/envs/feds diff --git a/run_dps.sh b/run_dps.sh index de49cd5..a058297 100644 --- a/run_dps.sh +++ b/run_dps.sh @@ -5,27 +5,28 @@ set -eo pipefail basedir=$( cd "$(dirname "$0")"; pwd -P ) echo "Basedir: $basedir" echo "Initial working directory: $(pwd -P)" + echo "conda: $(which conda)" # Only create conda environment if it's not currently active. This allows for # interactive testing of this script. -#if [[ $CONDA_PREFIX != "/projects/env-feds" ]]; then -# # Trying to resolve conda permissiosn issue -# # https://gitter.im/conda/conda?at=5dc427aa2f8a034357513172 -# export CONDA_PKGS_DIRS="$basedir/.conda" -# mkdir -p "$CONDA_PKGS_DIRS" -# conda env create -f "$basedir/env-feds.yml" -p "$basedir/env-feds" -# source activate "$basedir/env-feds" -#fi -source activate feds +if [[ $CONDA_PREFIX != "/projects/env-feds" ]]; then + # Trying to resolve conda permissiosn issue + # https://gitter.im/conda/conda?at=5dc427aa2f8a034357513172 + export CONDA_PKGS_DIRS="$basedir/.conda" + mkdir -p "$CONDA_PKGS_DIRS" + conda env create -f "$basedir/env-feds.yml" -p "$basedir/env-feds" + source activate "$basedir/env-feds" +fi + echo "Python: $(which python)" python --version + echo "Starting algorithm in subshell" ( cd "$basedir" echo "Running in directory: $(pwd -P)" #python -u -c "import FireRun; FireRun.CreekSamplerun()" -#python FireRun.py python FireRun.py ) echo "Done!" -- GitLab