{
  "slug": "hf-jobs-run-accepts-local-directories-for-volume-mounts-88e8a1dbb10d",
  "title": "hf jobs run accepts local directories for volume mounts",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-03T09:43:05.000Z",
  "announced_at": "2026-07-03T09:43:05.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a Job needs files from a local repository directory, pass that directory to `-v`; Hugging Face syncs it to the `jobs-artifacts` bucket and mounts it. For Python Jobs, use `sync_job_volume` to create a mountable volume.",
    "examples": [
      "hf jobs run -v ./<local-dir>:/<mount-path> <image> <command> [<args>...]",
      "hf jobs uv run -v ./<local-dir>:/<mount-path> <script.py> [<args>...]",
      "from huggingface_hub import run_uv_job, sync_job_volume\nvolume = sync_job_volume(\"./<local-dir>\", \"/<mount-path>\")\nrun_uv_job(\"<script.py>\", volumes=[volume])"
    ],
    "gotchas": [
      "Version: v1.22.0",
      "-v, --volume: Repeatable volume mount argument: `LOCAL_DIR:/MOUNT_PATH[:ro|:rw]`. The mount path is required and absolute. Local directory volumes default to read-only; `:rw` enables writes.",
      "sync_job_volume(source) (required): Local directory path to sync.",
      "sync_job_volume(mount_path) (required): Absolute mount path inside the Job container; must start with `/`.",
      "sync_job_volume(remote_name): Bucket subfolder name; defaults to a name derived from the source path and machine hostname.",
      "sync_job_volume(read_only): Defaults to `True`; set `False` to allow the Job to write to the bucket folder.",
      "sync_job_volume(namespace): Namespace owning the `jobs-artifacts` bucket; defaults to the current user's namespace. Use the same namespace as the Job.",
      "sync_job_volume(token): Access token; defaults to the locally saved token. `False` disables authentication.",
      "Prerequisite: Hugging Face Jobs require pre-paid credits for the user or organization.",
      "Prerequisite: Authenticate with Hugging Face; `sync_job_volume` uses the locally saved token by default.",
      "The local directory is synced to a `jobs-artifacts` bucket and mounted."
    ]
  },
  "why_it_matters": "Run a Job that needs files from a local repository directory mounted as a volume.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.22.0",
    "https://huggingface.co/docs/huggingface_hub/main/en/guides/cli",
    "https://huggingface.co/docs/huggingface_hub/main/en/guides/jobs",
    "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/cli.md",
    "https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api",
    "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/guides/cli.md"
  ],
  "rank": 0.95036,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-e6ed4cae21a7b793-7:gate",
    "evidence_hash": "f316d5257eea8951f435f08a3f7b5370d03f8637f0d89a9312db66c5df369f55"
  },
  "review": {
    "draft_hash": "2baf341b36f82b8dc3ff2726f64af6773d2157b73e8bb12e5c5bb27bfe427692",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.68 (>= 0.6 needed)."
  }
}
