Skip to content

Commit

Permalink
Trying to stage input files
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCinquini committed Mar 19, 2024
1 parent c6e7ff0 commit 03bde3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion airflow/dags/docker_cwl_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ spec:

containers:
- name: cwl-docker
image: ghcr.io/unity-sds/unity-sps/sps-docker-cwl:2.0.0-beta.2
# image: ghcr.io/unity-sds/unity-sps/sps-docker-cwl:2.0.0-beta.2
image: ghcr.io/unity-sds/unity-sps/sps-docker-cwl:develop27
imagePullPolicy: Always
command: ["/usr/share/cwl/docker_cwl_entrypoint.sh"]
securityContext:
Expand Down
5 changes: 4 additions & 1 deletion airflow/dags/sbg_L1_to_L2_e2e_cwl_step_by_step_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def setup(ti=None, **context):

preprocess_dict = {
"input_processing_labels": ["label1", "label2"],
# Note: must pass the path RELATIVE to te working directory - not the absolute path on the Pod
"input_cmr_stac": "cmr-results.json",
"input_unity_dapa_client": context["params"]["input_unity_dapa_client"],
"input_unity_dapa_api": context["params"]["input_unity_dapa_api"],
Expand Down Expand Up @@ -151,11 +152,13 @@ def setup(ti=None, **context):
persistent_volume_claim=k8s.V1PersistentVolumeClaimVolumeSource(claim_name="kpo-efs"),
)
],
# do_xcom_push=True,
dag=dag,
)

# Step: PREPROCESS
SBG_PREPROCESS_CWL = "https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl"
# SBG_PREPROCESS_CWL = "https://raw.githubusercontent.com/unity-sds/sbg-workflows/main/preprocess/sbg-preprocess-workflow.cwl"
SBG_PREPROCESS_CWL = "https://raw.githubusercontent.com/LucaCinquini/sbg-workflows/devel/preprocess/sbg-preprocess-workflow.cwl"
preprocess_task = KubernetesPodOperator(
namespace=POD_NAMESPACE,
name="Preprocess",
Expand Down
3 changes: 3 additions & 0 deletions airflow/docker/cwl/docker_cwl_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ pwd
ls -lR
cwl-runner --tmp-outdir-prefix "$PWD"/ --no-read-only "$cwl_workflow" "$job_args"
ls -lR
# FIXME
# mkdir -p /airflow/xcom/
# cp cmr-results.json /airflow/xcom/return.json
deactivate

# Stop Docker engine
Expand Down

0 comments on commit 03bde3f

Please sign in to comment.