# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: batch/v1
kind: Job
metadata:
  name: model-download
spec:
  backoffLimit: 3
  completions: 1
  parallelism: 1
  template:
    metadata:
      labels:
        app: model-download
    spec:
      restartPolicy: Never
      tolerations: []
      containers:
        - name: model-download
          image: python:3.10-slim
          command: ["sh", "-c"]
          env:
            - name: HF_HUB_ENABLE_HF_TRANSFER
              value: "1"
          args:
            - |
              set -eux
              pip install --no-cache-dir huggingface_hub hf_transfer
              hf download nvidia/DeepSeek-R1-FP4 --local-dir /model-cache/deepseek-r1-fp4
              hf download deepseek-ai/DeepSeek-R1 --local-dir /model-cache/deepseek-r1
          volumeMounts:
            - name: model-cache
              mountPath: /model-cache
      volumes:
      - name: model-cache
        persistentVolumeClaim:
          claimName: model-cache