Hello I am trying to share file between steps, and In order to do this I have the following code:
VOLUME_NAME_PATH = 'pictures'
VOLUME_PATH = f'/{VOLUME_NAME_PATH}'
V1_VOLUME = k8s_client.V1Volume(name=VOLUME_NAME_PATH)
V1_VOLUME_MOUNT = k8s_client.V1VolumeMount(
mount_path=VOLUME_PATH,
name=VOLUME_NAME_PATH
)
def pictures_pipeline():
download_images_op_step = download_images_op(volume_path=VOLUME_PATH) \
.add_volume(V1_VOLUME) \
.add_volume_mount(V1_VOLUME_MOUNT)
compress_images_op_step = compress_images_op(volume_path=VOLUME_PATH) \
.add_volume(V1_VOLUME) \
.add_volume_mount(V1_VOLUME_MOUNT)
compress_images_op_step.after(download_images_op_step)
As you can I see I am creating a V1_VOLUMNE, and mounth the same for the all steps in the pipeline.
THe first step download_images_op_step
, download and save the pictures in the volume, but when the second step starts the the volume is empty.
So how can I persis the data from one to another?
Thanks