From 47cf9da4f1408add4a4ecb46a5effe448d41b716 Mon Sep 17 00:00:00 2001 From: skarpree Date: Tue, 14 Apr 2026 11:11:05 -0700 Subject: [PATCH] feat: Add V-Ray 7.20.02 DR2 conda recipes for Maya 2025 and 2026 Signed-off-by: Karpreet Sethi Signed-off-by: skarpree --- conda_recipes/maya-vray-7.2-2025/README.md | 25 +++++++ .../maya-vray-7.2-2025/deadline-cloud.yaml | 10 +++ .../maya-vray-7.2-2025/recipe/build.sh | 74 +++++++++++++++++++ .../maya-vray-7.2-2025/recipe/recipe.yaml | 40 ++++++++++ conda_recipes/maya-vray-7.2-2026/README.md | 25 +++++++ .../maya-vray-7.2-2026/deadline-cloud.yaml | 10 +++ .../maya-vray-7.2-2026/recipe/build.sh | 74 +++++++++++++++++++ .../maya-vray-7.2-2026/recipe/recipe.yaml | 40 ++++++++++ 8 files changed, 298 insertions(+) create mode 100644 conda_recipes/maya-vray-7.2-2025/README.md create mode 100644 conda_recipes/maya-vray-7.2-2025/deadline-cloud.yaml create mode 100644 conda_recipes/maya-vray-7.2-2025/recipe/build.sh create mode 100644 conda_recipes/maya-vray-7.2-2025/recipe/recipe.yaml create mode 100644 conda_recipes/maya-vray-7.2-2026/README.md create mode 100644 conda_recipes/maya-vray-7.2-2026/deadline-cloud.yaml create mode 100755 conda_recipes/maya-vray-7.2-2026/recipe/build.sh create mode 100644 conda_recipes/maya-vray-7.2-2026/recipe/recipe.yaml diff --git a/conda_recipes/maya-vray-7.2-2025/README.md b/conda_recipes/maya-vray-7.2-2025/README.md new file mode 100644 index 00000000..f965c7b0 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2025/README.md @@ -0,0 +1,25 @@ +# V-Ray 7.20.02 conda build recipe for Maya 2025 +Use this recipe to create a V-Ray 7.20.02 (Update 2 DR2) for Maya 2025 conda package to use with AWS Deadline Cloud. Conda packages let you customize the software you can use with your Deadline Cloud deployment. Read more about how to host a conda channel for these custom conda packages [here](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes#infrastructure-setup-prerequisites). + +## Requirement +### Download the archive file +- Download the `vray_adv_72002_maya2025_dr2_rhel8` full download file from [Chaos](https://www.chaos.com/vray/maya)\ +**_NOTE:_** Need to have a Chaos account to access the link. Ensure the download completes fully (~1.1 GB). Truncated downloads will fail with installer checksum errors. +- Place the downloaded file in the `conda_recipes/archive_files` directory in your git clone of the +[deadline-cloud-samples](https://github.com/aws-deadline/deadline-cloud-samples) repository. + +### Build required conda package(s) +To use V-Ray for Maya, we need to build: +1. Maya 2025 conda package by: + - Follow Maya 2025 [README](../maya-2025/README.md) for getting archive file + - running `./submit-package-job maya-2025` to build the package +2. (_Optional - build this for Maya adaptor_) Maya adaptor conda package by running: + - [_Prerequisite_] Deadline Cloud package: `./submit-package-job deadline` + - [_Prerequisite_] OpenJD runtime adaptor package:`./submit-package-job openjd-adaptor-runtime` + - Maya adaptor package:`./submit-package-job maya-openjd` + + **_NOTE:_** Need to also add `conda-forge` to list of conda channel since Maya adaptor and prerequisite packages depend on it to run successful. + +## Build Conda Package +- Follow this [README](https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/conda_recipes/README.md) to submit a job building V-Ray for Maya conda package. +- Build command: `./submit-package-job maya-vray-7.2-2025` diff --git a/conda_recipes/maya-vray-7.2-2025/deadline-cloud.yaml b/conda_recipes/maya-vray-7.2-2025/deadline-cloud.yaml new file mode 100644 index 00000000..a8b05fb1 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2025/deadline-cloud.yaml @@ -0,0 +1,10 @@ +condaPlatforms: + - platform: linux-64 + defaultSubmit: true + sourceArchiveFilename: vray_adv_72002_maya2025_dr2_rhel8 + sourceDownloadInstructions: 'Download the vray_adv_72002_maya2025_dr2_rhel8 full download file from Chaos Group. You will need a Chaos Group account to access the V-Ray downloads.' + buildTool: rattler-build +jobParameters: + # conda-forge is used to get patchelf on Linux + - name: CondaChannels + value: conda-forge \ No newline at end of file diff --git a/conda_recipes/maya-vray-7.2-2025/recipe/build.sh b/conda_recipes/maya-vray-7.2-2025/recipe/build.sh new file mode 100644 index 00000000..b8dc8bc7 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2025/recipe/build.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -xeuo pipefail + +MAYA_VERSION=2025 + +# Where we will install V-Ray for Maya +MAYA_VRAY_ROOT="$PREFIX/opt/chaos/maya-vray-$MAYA_VERSION" +MAYA_VRAY_VRAY_ROOT="$MAYA_VRAY_ROOT/vray" +MAYA_VRAY_MAYA_ROOT="$MAYA_VRAY_ROOT/maya_vray" +mkdir -p $MAYA_VRAY_ROOT +cd $MAYA_VRAY_ROOT + +# Run the installer to extract the files +chmod u+x $SRC_DIR/vray* +$SRC_DIR/vray* -noCheckSum -unpackInstall . + +# Remove the samples, they're not needed on the farm +rm -rf "$MAYA_VRAY_VRAY_ROOT/samples" +# Remove the docs, they're not needed on the farm +rm -rf "$MAYA_VRAY_VRAY_ROOT/docs" + +# Add relative RPATHs for the vray executable and the plugins using patchelf. This is so we can +# follow the recommendation of https://docs.conda.io/projects/conda-build/en/latest/resources/use-shared-libraries.html +# to never use LD_LIBRARY_PATH in Conda environments. +for FILE in "$MAYA_VRAY_MAYA_ROOT"/lib/*.so; do + patchelf --add-rpath '$ORIGIN/.' "$FILE" +done +for FILE in "$MAYA_VRAY_VRAY_ROOT"/lib/*.so.*; do + patchelf --add-rpath '$ORIGIN/.:$ORIGIN/../../lib/aux' "$FILE" +done + +patchelf --add-rpath '$ORIGIN/../../vray/lib' $MAYA_VRAY_MAYA_ROOT/plug-ins/vrayformaya.so + +# Install dependencies not available on Deadline Cloud service-managed fleets +mkdir -p $SRC_DIR/download +cd $SRC_DIR/download +dnf download --resolve -y xcb-util-image xcb-util-renderutil xcb-util-cursor \ + xcb-util-wm xcb-util-keysyms libxkbcommon-x11 xcb-util + +for rpm_file in $(realpath $SRC_DIR/download/*.rpm); do + rpm2cpio "$rpm_file" | cpio -idm +done + +# Copy .so's to the V-Ray installation. We place these in a separate auxiliary directory so they're clearly +# separated from what came with V-Ray. +mkdir -p "$MAYA_VRAY_ROOT/lib/aux" +find . -iname "*.so.*" -exec cp -P -r {} "$MAYA_VRAY_ROOT/lib/aux/" \; + +for FILE in "$MAYA_VRAY_ROOT"/lib/aux/*.so.*; do + patchelf --add-rpath '$ORIGIN/.' "$FILE" +done + +mkdir -p "$PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION" +cp $MAYA_VRAY_ROOT/maya_root/modules/VRayForMaya.module $PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION +sed -i "s|+ VRayForMaya2025rhel8 0.9 ../../maya_vray|+ VRayForMaya2025rhel8 0.9 $MAYA_VRAY_MAYA_ROOT|" $PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION/VRayForMaya.module +if grep -q "$MAYA_VRAY_MAYA_ROOT" "$PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION/VRayForMaya.module"; then + echo "Changing maya_root/VRayForMaya.module file path to $MAYA_VRAY_MAYA_ROOT succeeded" +else + echo "Failed to change maya_root/VRayForMaya.module file path " + exit 1 +fi + +# Script to set environment variables during activation +mkdir -p $PREFIX/etc/conda/activate.d +cat < $PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.sh +export "VRAY_EULA=https://docs.chaos.com/display/VNS/End+User+License+Agreement" +EOF + +mkdir -p $PREFIX/etc/conda/deactivate.d +cat < $PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.sh +if ! [ -z \$VRAY ]; then + unset VRAY_EULA +fi +EOF \ No newline at end of file diff --git a/conda_recipes/maya-vray-7.2-2025/recipe/recipe.yaml b/conda_recipes/maya-vray-7.2-2025/recipe/recipe.yaml new file mode 100644 index 00000000..d7394442 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2025/recipe/recipe.yaml @@ -0,0 +1,40 @@ +# Recipe in rattler-build format. +# See https://prefix-dev.github.io/rattler-build/latest/ + +context: + version_maya: "2025" + version_vray: "7.20.02" + +package: + name: maya-vray + version: ${{ version_maya + "." + version_vray }} + +source: + url: file://archive_files/vray_adv_${{ version_vray | replace(".", "") }}_maya${{ version_maya }}_dr2_rhel8 + sha256: cdbeba5ea82120155ecda75da01e359d1dc01f8905a4751d233b40136f9610c6 + +build: + number: 0 + # These build options for repackaging an application + # https://prefix-dev.github.io/rattler-build/latest/build_options/#prefix-detection-replacement-options + prefix_detection: + ignore_binary_files: True + # https://prefix-dev.github.io/rattler-build/latest/build_options/#dynamic-linking-configuration + dynamic_linking: + binary_relocation: False + missing_dso_allowlist: + - "**" + +requirements: + build: + - patchelf + run: + - maya ${{ version_maya }}.* + +about: + homepage: https://www.chaos.com/vray/maya + documentation: https://docs.chaos.com/display/VMAYA + license: LicenseRef-ChaosEULA + summary: | + V-Ray is a 3D photorealistic ray-traced rendering plug-in. + V-Ray for Maya is a 3D rendering plugin for Maya that's used to create visual effects and animations for film, television, and other industries. \ No newline at end of file diff --git a/conda_recipes/maya-vray-7.2-2026/README.md b/conda_recipes/maya-vray-7.2-2026/README.md new file mode 100644 index 00000000..fc0fa551 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2026/README.md @@ -0,0 +1,25 @@ +# V-Ray 7.20.02 conda build recipe for Maya 2026 +Use this recipe to create a V-Ray 7.20.02 (Update 2 DR2) for Maya 2026 conda package to use with AWS Deadline Cloud. Conda packages let you customize the software you can use with your Deadline Cloud deployment. Read more about how to host a conda channel for these custom conda packages [here](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes#infrastructure-setup-prerequisites). + +## Requirement +### Download the archive file +- Download the `vray_adv_72002_maya2026_dr2_rhel8` full download file from [Chaos](https://www.chaos.com/vray/maya)\ +**_NOTE:_** Need to have a Chaos account to access the link. Ensure the download completes fully (~1.1 GB). Truncated downloads will fail with installer checksum errors. +- Place the downloaded file in the `conda_recipes/archive_files` directory in your git clone of the +[deadline-cloud-samples](https://github.com/aws-deadline/deadline-cloud-samples) repository. + +### Build required conda package(s) +To use V-Ray for Maya, we need to build: +1. Maya 2026 conda package by: + - Follow Maya 2026 [README](../maya-2026/README.md) for getting archive file + - running `./submit-package-job maya-2026` to build the package +2. (_Optional - build this for Maya adaptor_) Maya adaptor conda package by running: + - [_Prerequisite_] Deadline Cloud package: `./submit-package-job deadline` + - [_Prerequisite_] OpenJD runtime adaptor package:`./submit-package-job openjd-adaptor-runtime` + - Maya adaptor package:`./submit-package-job maya-openjd` + + **_NOTE:_** Need to also add `conda-forge` to list of conda channel since Maya adaptor and prerequisite packages depend on it to run successful. + +## Build Conda Package +- Follow this [README](https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/conda_recipes/README.md) to submit a job building V-Ray for Maya conda package. +- Build command: `./submit-package-job maya-vray-7.2-2026` diff --git a/conda_recipes/maya-vray-7.2-2026/deadline-cloud.yaml b/conda_recipes/maya-vray-7.2-2026/deadline-cloud.yaml new file mode 100644 index 00000000..1d9319e8 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2026/deadline-cloud.yaml @@ -0,0 +1,10 @@ +condaPlatforms: + - platform: linux-64 + defaultSubmit: true + sourceArchiveFilename: vray_adv_72002_maya2026_dr2_rhel8 + sourceDownloadInstructions: 'Download the vray_adv_72002_maya2026_rhel8 full download file from Chaos Group. You will need a Chaos Group account to access the V-Ray downloads.' + buildTool: rattler-build +jobParameters: + # conda-forge is used to get patchelf on Linux + - name: CondaChannels + value: conda-forge \ No newline at end of file diff --git a/conda_recipes/maya-vray-7.2-2026/recipe/build.sh b/conda_recipes/maya-vray-7.2-2026/recipe/build.sh new file mode 100755 index 00000000..678b3e90 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2026/recipe/build.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -xeuo pipefail + +MAYA_VERSION=2026 + +# Where we will install V-Ray for Maya +MAYA_VRAY_ROOT="$PREFIX/opt/chaos/maya-vray-$MAYA_VERSION" +MAYA_VRAY_VRAY_ROOT="$MAYA_VRAY_ROOT/vray" +MAYA_VRAY_MAYA_ROOT="$MAYA_VRAY_ROOT/maya_vray" +mkdir -p $MAYA_VRAY_ROOT +cd $MAYA_VRAY_ROOT + +# Run the installer to extract the files +chmod u+x $SRC_DIR/vray* +$SRC_DIR/vray* -unpackInstall . + +# Remove the samples, they're not needed on the farm +rm -rf "$MAYA_VRAY_VRAY_ROOT/samples" +# Remove the docs, they're not needed on the farm +rm -rf "$MAYA_VRAY_VRAY_ROOT/docs" + +# Add relative RPATHs for the vray executable and the plugins using patchelf. This is so we can +# follow the recommendation of https://docs.conda.io/projects/conda-build/en/latest/resources/use-shared-libraries.html +# to never use LD_LIBRARY_PATH in Conda environments. +for FILE in "$MAYA_VRAY_MAYA_ROOT"/lib/*.so; do + patchelf --add-rpath '$ORIGIN/.' "$FILE" +done +for FILE in "$MAYA_VRAY_VRAY_ROOT"/lib/*.so.*; do + patchelf --add-rpath '$ORIGIN/.:$ORIGIN/../../lib/aux' "$FILE" +done + +patchelf --add-rpath '$ORIGIN/../../vray/lib' $MAYA_VRAY_MAYA_ROOT/plug-ins/vrayformaya.so + +# Install dependencies not available on Deadline Cloud service-managed fleets +mkdir -p $SRC_DIR/download +cd $SRC_DIR/download +dnf download --resolve -y xcb-util-image xcb-util-renderutil xcb-util-cursor \ + xcb-util-wm xcb-util-keysyms libxkbcommon-x11 xcb-util + +for rpm_file in $(realpath $SRC_DIR/download/*.rpm); do + rpm2cpio "$rpm_file" | cpio -idm +done + +# Copy .so's to the V-Ray installation. We place these in a separate auxiliary directory so they're clearly +# separated from what came with V-Ray. +mkdir -p "$MAYA_VRAY_ROOT/lib/aux" +find . -iname "*.so.*" -exec cp -P -r {} "$MAYA_VRAY_ROOT/lib/aux/" \; + +for FILE in "$MAYA_VRAY_ROOT"/lib/aux/*.so.*; do + patchelf --add-rpath '$ORIGIN/.' "$FILE" +done + +mkdir -p "$PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION" +cp $MAYA_VRAY_ROOT/maya_root/modules/VRayForMaya.module $PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION +sed -i "s|+ VRayForMaya2026rhel8 0.9 ../../maya_vray|+ VRayForMaya2026rhel8 0.9 $MAYA_VRAY_MAYA_ROOT|" $PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION/VRayForMaya.module +if grep -q "$MAYA_VRAY_MAYA_ROOT" "$PREFIX/usr/autodesk/modules/maya/$MAYA_VERSION/VRayForMaya.module"; then + echo "Changing maya_root/VRayForMaya.module file path to $MAYA_VRAY_MAYA_ROOT succeeded" +else + echo "Failed to change maya_root/VRayForMaya.module file path " + exit 1 +fi + +# Script to set environment variables during activation +mkdir -p $PREFIX/etc/conda/activate.d +cat < $PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.sh +export "VRAY_EULA=https://docs.chaos.com/display/VNS/End+User+License+Agreement" +EOF + +mkdir -p $PREFIX/etc/conda/deactivate.d +cat < $PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.sh +if ! [ -z \$VRAY ]; then + unset VRAY_EULA +fi +EOF \ No newline at end of file diff --git a/conda_recipes/maya-vray-7.2-2026/recipe/recipe.yaml b/conda_recipes/maya-vray-7.2-2026/recipe/recipe.yaml new file mode 100644 index 00000000..376a30a9 --- /dev/null +++ b/conda_recipes/maya-vray-7.2-2026/recipe/recipe.yaml @@ -0,0 +1,40 @@ +# Recipe in rattler-build format. +# See https://prefix-dev.github.io/rattler-build/latest/ + +context: + version_maya: "2026" + version_vray: "7.20.02" + +package: + name: maya-vray + version: ${{ version_maya + "." + version_vray }} + +source: + url: file://archive_files/vray_adv_${{ version_vray | replace(".", "") }}_maya${{ version_maya }}_dr2_rhel8 + sha256: a6e1e65202f6c9b3d4e12e7eb423a780a34dfeac3540658b16f4e20f8009fca6 + +build: + number: 0 + # These build options for repackaging an application + # https://prefix-dev.github.io/rattler-build/latest/build_options/#prefix-detection-replacement-options + prefix_detection: + ignore_binary_files: True + # https://prefix-dev.github.io/rattler-build/latest/build_options/#dynamic-linking-configuration + dynamic_linking: + binary_relocation: False + missing_dso_allowlist: + - "**" + +requirements: + build: + - patchelf + run: + - maya ${{ version_maya }}.* + +about: + homepage: https://www.chaos.com/vray/maya + documentation: https://docs.chaos.com/display/VMAYA + license: LicenseRef-ChaosEULA + summary: | + V-Ray is a 3D photorealistic ray-traced rendering plug-in. + V-Ray for Maya is a 3D rendering plugin for Maya that's used to create visual effects and animations for film, television, and other industries. \ No newline at end of file