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
This commit is contained in:
17
main.nf
17
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user