Dagweave catalog

Download and unpack a dataset

dataset-downloadv1.0.0updated 2026-07-171 version

Download a dataset archive from a URL and unpack it (.tar.gz, .tgz, .tar or .zip) into a destination directory, with an optional bearer token read from a Kubernetes Secret. Unlike download-file, this item also extracts the archive so a downstream step sees the unpacked dataset tree.

Install v1.0.0

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/dataset-download/1.0.0/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/dataset-download/1.0.0/template.yaml

Facts

Category
AI
Tags
ai alpine
Entrypoint
fetch
Template SHA-256
d3c58252f10c36236448abbdfb2dcff1a7c13a4cede9481ae994eecc5e4c572d
Source
dataset-download at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
alpinenone recordedsha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

Parameters

NameDescriptionDefault
url required Absolute URL of the dataset archive to download.
Example https://example.com/datasets/mnist.tar.gz
none
dest-path Directory to download into and unpack the archive under. /tmp/dataset
token-secret-key Key within the Secret that holds the bearer token. token
token-secret-name Name of the Kubernetes Secret holding an optional bearer token. If the Secret is absent no Authorization header is sent. dataset-token

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: dataset-download
  labels:
    dagweave.io/catalog-item: dataset-download
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "AI"
spec:
  entrypoint: fetch
  templates:
    - name: fetch
      inputs:
        parameters:
          # Absolute URL of the dataset archive to download.
          - name: url
          # Directory to download into and unpack the archive under.
          - name: dest-path
            default: /tmp/dataset
          # Name/key of a Kubernetes Secret holding an optional bearer token. If the
          # Secret or key is absent no Authorization header is sent.
          - name: token-secret-name
            default: dataset-token
          - name: token-secret-key
            default: token
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # alpine:3.24 — provides sh, wget, tar and unzip (busybox).
        image: alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a
        command: [sh, -c]
        # Values are passed as env vars (below), never interpolated into the shell.
        # Downloads the archive with wget (optionally authenticated) then unpacks it
        # by extension. Unlike download-file this item also extracts the archive so a
        # downstream step sees the unpacked dataset tree.
        args:
          - |
            set -eu
            mkdir -p "${DEST_PATH}"
            if [ -n "${TOKEN:-}" ]; then
              wget --header="Authorization: Bearer ${TOKEN}" \
                -O "${DEST_PATH}/archive" "${URL}"
            else
              wget -O "${DEST_PATH}/archive" "${URL}"
            fi
            case "${URL}" in
              *.tar.gz|*.tgz) tar -xzf "${DEST_PATH}/archive" -C "${DEST_PATH}" ;;
              *.tar)          tar -xf  "${DEST_PATH}/archive" -C "${DEST_PATH}" ;;
              *.zip)          unzip -o "${DEST_PATH}/archive" -d "${DEST_PATH}" ;;
              *) echo "no known archive extension; left as ${DEST_PATH}/archive" ;;
            esac
            echo "dataset ready under ${DEST_PATH}"
            ls -la "${DEST_PATH}"
        env:
          - name: URL
            value: "{{inputs.parameters.url}}"
          - name: DEST_PATH
            value: "{{inputs.parameters.dest-path}}"
          - name: TOKEN
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.token-secret-name}}"
                key: "{{inputs.parameters.token-secret-key}}"
                optional: true

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.0 latest 2026-07-17

    Initial release.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/dataset-download/1.0.0/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/dataset-download/1.0.0/template.yaml

    version document, template.yaml

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/dataset-download \
  -p url=https://example.com/datasets/mnist.tar.gz

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: dataset-download-
spec:
  workflowTemplateRef:
    name: dataset-download
  arguments:
    parameters:
      - name: url
        value: "https://example.com/datasets/mnist.tar.gz"

As a step of a larger workflow

steps:
  - - name: dataset-download
      templateRef:
        name: dataset-download
        template: fetch