本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
任务包的资源参考元素
您可以使用 Deadline Cloud 作业附件在工作站和 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 pathsoutputs: # 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-type 文件系统位置都抽象出安装在工作站和工作主机上的网络文件共享。Deadline Cloud 仅上传不在这些文件共享中的文件。
有关创建和使用存储配置文件的更多信息,请参阅《截止日期云用户指南》中的 Deadl AWS ine Cloud 中的共享存储。
例-由 Deadline Cloud GUI 创建的资产参考文件
使用以下命令使用 blender_render 示例提交作业。
deadline bundle gui-submit blender_render/
在 “作业附件” 选项卡上向作业添加一些其他文件:
提交任务后,可以在作业历史记录目录的任务包中查看该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: []