Commit cd402ef9 authored by Petras, Randy's avatar Petras, Randy Committed by Peterson, Peter
Browse files

Adjusting NSD-Conda-wrap to initiate pixi run instead.

parent c62bd5f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Name:           nsd-app-wrap
Version:        2.02
Version:        2.03
Release:        1%{?dist}
Summary:        Wrapper scripts to launch python applications installed via anaconda
Vendor:         Peter F. Peterson
+8 −3
Original line number Diff line number Diff line
@@ -102,12 +102,17 @@ pixi_launch() {
        PIXI_PREFIX="/usr/local/pixi"
        PIXI_ENV="${1}"
        shift

      	# This grabs everything past the first argument
        PIXI_TASK="${@}"
        PIXI_TASK="${*}"

        path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}"

        # Verify path_to_manifest works
      	if [ ! -f "${path_to_manifest}" ]; then
	          echo "No pixi environment found at ${path_to_manifest}"
	          exit 1
	      fi

        #echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest."

        _remove_font_cache
+6 −6
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ if [ -n "$1" ]; then
        _usage
        exit 0
    fi
    CONDA_ENVIRON="$1"
    PIXI_ENVIRON="$1"
    shift # drop this argument
else
    echo "Must specify a conda environment to activate"
@@ -33,8 +33,8 @@ fi
. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" ||
    . /bin/nsd-app-wrap.sh

# activate the environment - will be deactivated on exit
activate_conda_environment "${CONDA_ENVIRON}"

# start the application
"$STARTUP" "$@"
# launch pixi
# put together arguments - conda_env, application, argv
args=("${PIXI_ENVIRON}" "$STARTUP" "$@") 
# launch the tool
pixi_launch "${args[@]}"