

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# アセットがジョブバンドルの要素を参照する
<a name="build-job-bundle-assets"></a>

Deadline Cloud [ジョブアタッチメント](https://docs.aws.amazon.com/deadline-cloud/latest/userguide/storage-job-attachments.html)を使用して、ワークステーションと Deadline Cloud 間でファイルを送受信できます。アセットリファレンスファイルには、入力ファイルとディレクトリ、および添付ファイルの出力ディレクトリが一覧表示されます。このファイル内のすべてのファイルとディレクトリを一覧表示しない場合は、 `deadline bundle gui-submit` コマンドを使用してジョブを送信するときに選択できます。

ジョブアタッチメントを使用していない場合、このファイルは効果がありません。

ジョブテンプレートは、YAML 形式 (`asset_references.yaml`) または JSON 形式 () で定義できます`asset_references.json`。このセクションの例は YAML 形式で示されています。

YAML では、ファイルの形式は次のとおりです。

```
assetReferences:
    inputs:
        # Filenames on the submitting workstation whose file contents are needed as 
        # inputs to run the job.
        filenames:
        - {{list of file paths}}
        # Directories on the submitting workstation whose contents are needed as inputs
        # to run the job.
        directories:
        - {{list of directory paths}}

    outputs:
        # Directories on the submitting workstation where the job writes output files
        # if running locally.
        directories:
        - {{list of directory paths}}

    # Paths referenced by the job, but not necessarily input or output.
    # Use this if your job uses the name of a path in some way, but does not explicitly need
    # the contents of that path.
    referencedPaths:
    - {{list of directory paths}}
```

Amazon S3 にアップロードする入力ファイルまたは出力ファイルを選択すると、Deadline Cloud はファイルパスをストレージプロファイルにリストされているパスと比較します。ストレージプロファイルの各 `SHARED`タイプのファイルシステムの場所は、ワークステーションとワーカーホストにマウントされたネットワークファイル共有を抽象化します。Deadline Cloud は、これらのファイル共有の 1 つにないファイルのみをアップロードします。

ストレージプロファイルの作成と使用の詳細については、[「Deadline Cloud ユーザーガイド」の「Deadline Cloud の共有ストレージ](https://docs.aws.amazon.com/deadline-cloud/latest/userguide/storage-shared.html)」を参照してください。 *AWS *

**Example - Deadline Cloud GUI によって作成されたアセットリファレンスファイル**  
次のコマンドを使用して、[Blender\_render サンプル](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/job_bundles/blender_render)を使用してジョブを送信します。  

```
deadline bundle gui-submit blender_render/
```
ジョブアタッチメントタブの**ジョブ**にいくつかのファイルを追加します。  

![Deadline Cloud ジョブ送信 GUI のジョブアタッチメントペイン。入力ファイル /private/tmp/bundle_demo/a_texture.png と入力ディレクトリ /private/tmp/bundle_demo/assets を追加します。](http://docs.aws.amazon.com/ja_jp/deadline-cloud/latest/developerguide/images/blender_submit_add_job_attachments.png)

ジョブを送信すると、ジョブ履歴ディレクトリのジョブバンドル内の `asset_references.yaml` ファイルを参照して、YAML ファイル内のアセットを確認できます。  

```
% cat ~/.deadline/job_history/\(default\)/2024-06/2024-06-20-01-JobBundle-Demo/asset_references.yaml 
assetReferences:
  inputs:
    filenames:
    - /private/tmp/bundle_demo/a_texture.png
    directories:
    - /private/tmp/bundle_demo/assets
  outputs:
    directories: []
  referencedPaths: []
```