This is an automated email from the ASF dual-hosted git repository.

yasith pushed a commit to branch cybershuttle-staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/cybershuttle-staging by this 
push:
     new 7a0dfbf594 handle empty conda/pip deps, fix agent issues
7a0dfbf594 is described below

commit 7a0dfbf594f5576877cbdd422d12b3f4969c0a74
Author: yasithdev <[email protected]>
AuthorDate: Tue Apr 8 03:27:09 2025 -0400

    handle empty conda/pip deps, fix agent issues
---
 .../airavata-python-sdk/airavata_jupyter_magic/__init__.py           | 4 ++--
 modules/agent-framework/airavata-agent/Makefile                      | 4 ++--
 modules/agent-framework/airavata-agent/agent.go                      | 2 +-
 modules/agent-framework/airavata-agent/agent.sh                      | 5 +----
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git 
a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata_jupyter_magic/__init__.py
 
b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata_jupyter_magic/__init__.py
index 04b1fbd491..8910da5a01 100644
--- 
a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata_jupyter_magic/__init__.py
+++ 
b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata_jupyter_magic/__init__.py
@@ -283,8 +283,8 @@ def submit_agent_job(
         collection = models + datasets
         mounts = [f"{i['identifier']}:{i['mount_point']}" for i in collection]
         # dependencies
-        condas = content["additional_dependencies"]["conda"]
-        pips = content["additional_dependencies"]["pip"]
+        condas = content["additional_dependencies"]["conda"] or []
+        pips = content["additional_dependencies"]["pip"] or []
         data = {
             'experimentName': app_name,
             'nodeCount': 1,
diff --git a/modules/agent-framework/airavata-agent/Makefile 
b/modules/agent-framework/airavata-agent/Makefile
index 193ed7b11d..6a6d2180cc 100644
--- a/modules/agent-framework/airavata-agent/Makefile
+++ b/modules/agent-framework/airavata-agent/Makefile
@@ -37,14 +37,14 @@ deploy-expanse: deploy-expanse-scigap 
deploy-expanse-gridchem
 
 deploy-expanse-scigap:
        ssh scigap@expanse \
-       "module load singularitypro && srun -N1 -n1 -A uic151 -p shared --mem 
4G -t 30 \
+       "module load singularitypro && srun -N1 -n1 -A ind123 -p shared --mem 
4G -t 30 \
        singularity pull --disable-cache --force \
        cybershuttle/container/remote-agent-base.sif \
        docker://$(IMAGE_NAME)"
 
 deploy-expanse-gridchem:
        ssh gridchem@expanse \
-       "module load singularitypro && srun -N1 -n1 -A uic151 -p shared --mem 
4G -t 30 \
+       "module load singularitypro && srun -N1 -n1 -A ind123 -p shared --mem 
4G -t 30 \
        singularity pull --disable-cache --force \
        cybershuttle/container/remote-agent-base.sif \
        docker://$(IMAGE_NAME)"
diff --git a/modules/agent-framework/airavata-agent/agent.go 
b/modules/agent-framework/airavata-agent/agent.go
index 2b374f7a00..9d8619dd68 100644
--- a/modules/agent-framework/airavata-agent/agent.go
+++ b/modules/agent-framework/airavata-agent/agent.go
@@ -245,7 +245,7 @@ func startJupyterKernel(envName string) int {
        log.Printf("[agent.go] startJupyterKernel() Starting python server in 
env: %s...\n", envName)
        // Create temp file for unix socket
        log.Fatalf("[agent.go] startJupyterKernel() creating unix socket...\n")
-       tmpFile, err := os.CreateTemp("", "kernel-*.sock")
+       tmpFile, err := os.CreateTemp(os.TempDir(), "kernel-*.sock")
        if err != nil {
                log.Fatalf("[agent.go] startJupyterKernel() Failed to create 
unix socket: %v\n", err)
        }
diff --git a/modules/agent-framework/airavata-agent/agent.sh 
b/modules/agent-framework/airavata-agent/agent.sh
index 886338ce2c..6c7e9a82a1 100755
--- a/modules/agent-framework/airavata-agent/agent.sh
+++ b/modules/agent-framework/airavata-agent/agent.sh
@@ -81,7 +81,4 @@ singularity exec \
   --env MAMBA_ROOT_PREFIX=/scratch \
   --env TMPDIR=/scratch/tmp \
   $CS_HOME/container/$CONTAINER \
-  bash -c "\
-  micromamba create -n $AGENT && \
-  /opt/airavata-agent --server $SERVER:19900 --agent $AGENT --lib $LIBRARIES 
--pip $PIP $@\
-  "
+  bash -c "micromamba create -n $AGENT && /opt/airavata-agent --server 
$SERVER:19900 --agent $AGENT --lib $LIBRARIES --pip $PIP"

Reply via email to