diff --git a/package-lock.json b/package-lock.json index 959594d72bbe696d513fc5ca572cbbeb137fa20c..be37a3e534aed19236f7bfe8186a5a27bf938ed0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6640,9 +6640,9 @@ } }, "node_modules/vite": { - "version": "5.2.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz", - "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==", + "version": "5.2.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.13.tgz", + "integrity": "sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==", "dev": true, "dependencies": { "esbuild": "^0.20.1", diff --git a/src/components/workflows/modals/ArbitraryWorkflowModal.vue b/src/components/workflows/modals/ArbitraryWorkflowModal.vue index 8a9a45d3a3f25d3d6e1e41308b9b10718b7231b6..132dd4a27f224721d79fb8aeaa6d96e7b0a60029 100644 --- a/src/components/workflows/modals/ArbitraryWorkflowModal.vue +++ b/src/components/workflows/modals/ArbitraryWorkflowModal.vue @@ -66,7 +66,7 @@ const executionEnvironmentState = reactive<{ cluster: boolean; }>({ cli: false, - cluster: true, + cluster: false, }); const formState = reactive<{ @@ -155,23 +155,33 @@ const resourcePathPrefix = computed<string>(() => { return resourcePath.slice(0, ind - 1); }); -const nextflowConfig = computed<string>( - () => `aws { - client { - endpoint = '${environment.S3_URL}' - s3PathStyleAccess = true - } +const nextflowConfig = computed<string>(() => { + if (executionEnvironmentState.cluster) { + return `// Nextflow config to emulate CloWM native execution +aws { accessKey = '${s3KeyStore.keys[0]?.access_key ?? ""}' secretKey = '${s3KeyStore.keys[0]?.secret_key ?? ""}' + client { + endpoint = '${environment.S3_URL}' + s3PathStyleAccess = true + } } +// Docker container options docker { enabled = true - runOptions = "-u \\$(id -u):\\$(id -g) -q -v ${executionEnvironmentState.cluster ? `${resourcePathPrefix.value}:${resourcePathPrefix.value}:ro` : ""}" + runOptions = "-u \\$(id -u):\\$(id -g) -q \\ + -v ${resourcePathPrefix.value}:${resourcePathPrefix.value}:ro \\ + -v /var/lib/lxcfs/proc/cpuinfo:/proc/cpuinfo:rw \\ + -v /var/lib/lxcfs/proc/diskstats:/proc/diskstats:rw \\ + -v /var/lib/lxcfs/proc/meminfo:/proc/meminfo:rw \\ + -v /var/lib/lxcfs/proc/stat:/proc/stat:rw \\ + -v /var/lib/lxcfs/proc/swaps:/proc/swaps:rw \\ + -v /var/lib/lxcfs/proc/uptime:/proc/uptime:rw" } // Disable unwanted features -tower.enabled = false +// Attention: Docker is the only supported container engine so far! weblog.enabled = false shifter.enabled = false singularity.enabled = false @@ -180,18 +190,134 @@ charliecloud.enabled = false dag.enabled = false trace.enabled = false +// Nextflow provenance tracking plugin +plugins { + id 'nf-prov' +} + +prov { + enabled = true + formats { + legacy { + file = "./nf-prov_manifest.json" + overwrite = true + } + bco { + file = "./nf-prov_bco.json" + overwrite = true + } + dag { + file = "./nf-prov_dag.html" + overwrite = true + } + } +} + executor { submitRateLimit = '5 sec' } +// Process resource labels currently used by CloWM +process { + executor = 'slurm' + container = 'ubuntu:22.04' + cpus = { 2 } + memory = { 4000.MB } + maxErrors = '-1' + + // Process-specific resource requirements + withLabel:process_single { + cpus = { 1 } + memory = { 6000.MB } + } + withLabel:process_low { + cpus = { 2 } + memory = { 12000.MB } + } + withLabel:process_medium { + cpus = { 6 } + memory = { 36000.MB } + } + withLabel:process_high { + cpus = { 12 } + memory = { 72000.MB } + } + withLabel:process_high_memory { + memory = { 200000.MB } + } + withLabel:error_ignore { + errorStrategy = 'ignore' + } + withLabel: highmemXLarge { + cpus = { 28 } + memory = {470000.MB} + } + withLabel: computeXLarge { + cpus = {28} + memory = {470000.MB} + } + withLabel: highmemLarge { + cpus = {28} + memory = {240000.MB} + } + withLabel: highmemMedium { + cpus = {14} + memory = {120000.MB} + } + withLabel: large { + cpus = {28} + memory = {64000.MB} + } + withLabel: medium { + cpus = {14} + memory = {32000.MB} + } + withLabel: small { + cpus = {8} + memory = {16000.MB} + } + withLabel: mini { + cpus = {4} + memory = {8000.MB} + } + withLabel: tiny { + cpus = {1} + memory = {2000.MB} + } +}`; + } + return `aws { + client { + endpoint = '${environment.S3_URL}' + s3PathStyleAccess = true + } + accessKey = '${s3KeyStore.keys[0]?.access_key ?? ""}' + secretKey = '${s3KeyStore.keys[0]?.secret_key ?? ""}' +} + +docker { + enabled = true + runOptions = "-u \\$(id -u):\\$(id -g) -q" +} + +// Disable unwanted features +tower.enabled = false +weblog.enabled = false +shifter.enabled = false +singularity.enabled = false +podman.enabled = false +charliecloud.enabled = false +dag.enabled = true +trace.enabled = true + process { - executor = '${executionEnvironmentState.cluster ? "slurm" : "local"}' + executor = 'local' container = 'ubuntu:22.04' cpus = { 2 } memory = { 4000.MB } } -`, -); +`; +}); const configDownloadUrl = computed<string>(() => createDownloadUrl(nextflowConfig.value, "text/plain"), @@ -268,12 +394,13 @@ onMounted(() => { <bootstrap-modal :modalId="modalId" :static-backdrop="false" - modal-label="Create Workflow Modal" + modal-label="Test My Workflow Modal" v-on="{ 'hidden.bs.modal': modalClosed }" size-modifier-modal="lg" > - <template v-slot:header>Start arbitrary Workflow</template> + <template v-slot:header>Test workflow prior registration</template> <template v-slot:body> + <h5>Choose your execution environment</h5> <div class="btn-group justify-content-center w-100 mb-2" role="group"> <input type="radio" @@ -286,7 +413,7 @@ onMounted(() => { :value="false" /> <label class="btn btn-outline-primary" for="clowm-outlined" - >CloWM Execution</label + >CloWM native execution</label > <input @@ -315,7 +442,7 @@ onMounted(() => { :value="false" /> <label class="btn btn-outline-primary" for="laptop-outlined" - >Own computer</label + >Personal computer</label > <input @@ -328,19 +455,26 @@ onMounted(() => { :value="true" /> <label class="btn btn-outline-primary" for="cluster-outlined" - >Dev Cluster</label + >Emulated CloWM environment</label > </div> - <h6>Nextflow config</h6> - <pre class="w-100 rounded-1"><code>{{ nextflowConfig }}</code></pre> - <h6>Start your workflow</h6> - <p> - Download the config file, run your nextflow workflow and point to the - downloaded config file + <p v-if="executionEnvironmentState.cluster"> + To emulate the CloWM native execution environment (e.g. docker + configuration, S3 access, resource labels etc.) on the workflow + development system, please download and use the Nextflow configuration + file (<code>clowm-nextflow.config</code>) as described below. + </p> + <p v-else> + To emulate a basic CloWM native execution environment (e.g. docker + configuration, S3 access etc.) on your personal computer, please + download and use the Nextflow configuration file + (<code>clowm-nextflow.config</code>) as described below. </p> <pre class="rounded-1 w-100" ><code>nextflow run /path/to/main.nf -c clowm-nextflow.config ...</code></pre> + <h6>clowm-nextflow.config:</h6> + <pre class="w-100 rounded-1"><code>{{ nextflowConfig }}</code></pre> </div> <form v-else diff --git a/src/views/workflows/ListWorkflowsView.vue b/src/views/workflows/ListWorkflowsView.vue index d6167b396b94758200311c9e65cca1191ae0a9fc..9ee51bded4b9037152defb23bd4f65611b73fe54 100644 --- a/src/views/workflows/ListWorkflowsView.vue +++ b/src/views/workflows/ListWorkflowsView.vue @@ -39,7 +39,9 @@ const filterFunctionMapping: Record< function filterWorkflowByString(workflow: WorkflowOut): boolean { return workflowsState.filterString.length > 0 - ? workflow.name.includes(workflowsState.filterString) + ? workflow.name + .toLowerCase() + .includes(workflowsState.filterString.toLowerCase()) : true; }