From f29323323b4d45c9378c2fcc445bc0c1d7c230e3 Mon Sep 17 00:00:00 2001 From: Olamide Isreal Date: Wed, 25 Mar 2026 13:30:24 +0100 Subject: [PATCH] Use pre-built jar and v2 tag to bypass Gradle permission issue - Call java -jar synthea-with-dependencies.jar directly instead of run_synthea which invokes Gradle at runtime - Tag image as v2 to force K8s to pull fresh image --- main.nf | 17 ++++------------- nextflow.config | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/main.nf b/main.nf index 7eebb8a..c293112 100644 --- a/main.nf +++ b/main.nf @@ -22,7 +22,7 @@ if (!params.outdir) { // Process to generate synthetic patients process generatePatients { - container 'harbor.cluster.omic.ai/omic/synthea-alldiseases:latest' + container 'harbor.cluster.omic.ai/omic/synthea-alldiseases:v2' publishDir params.outdir, mode: 'copy' input: @@ -37,21 +37,12 @@ process generatePatients { def genderArg = params.gender < 0.5 ? "M" : (params.gender > 0.5 ? "F" : "B") def seedArg = params.seed ? "-s ${params.seed}" : "" """ - # Check if a custom module exists, otherwise use built-in Synthea modules - MODULE_FILE="/app/src/main/resources/modules/${moduleBasename}.json" - if [ -f "\${MODULE_FILE}" ]; then - echo "Found custom module: \${MODULE_FILE}" | tee run.log - else - echo "Using built-in Synthea modules for: ${diseaseName}" | tee run.log - fi - - # Run Synthea patient generation - cd /app && ./run_synthea \ + # Use pre-built jar directly (bypasses Gradle which needs write access to .gradle) + cd /app && java -jar /app/build/libs/synthea-with-dependencies.jar \ -p ${params.population} \ -g ${genderArg} \ -a ${params.min_age}-${params.max_age} \ - ${seedArg} \ - -- ${diseaseName} 2>&1 | tee -a run.log + ${seedArg} 2>&1 | tee run.log # Collect FHIR output mkdir -p fhir diff --git a/nextflow.config b/nextflow.config index 9dd640b..ab5b9b8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -26,7 +26,7 @@ profiles { k8s { process { executor = 'k8s' - container = 'harbor.cluster.omic.ai/omic/synthea-alldiseases:latest' + container = 'harbor.cluster.omic.ai/omic/synthea-alldiseases:v2' } docker { enabled = true