Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions conda_recipes/blender-5.1/recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ VAREOF
# See zzz-blender-plugins-activate.sh for the full implementation.

mkdir -p $PREFIX/etc/conda/activate.d
cp $RECIPE_DIR/zzz-blender-plugins-activate.sh \
$PREFIX/etc/conda/activate.d/zzz-$PKG_NAME-$PKG_VERSION-plugins.sh
cp $RECIPE_DIR/zzz-blender-plugin-sync-activate.sh \
$PREFIX/etc/conda/activate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh
Comment thread
npmacl marked this conversation as resolved.

mkdir -p $PREFIX/etc/conda/deactivate.d
cp $RECIPE_DIR/zzz-blender-plugins-deactivate.sh \
$PREFIX/etc/conda/deactivate.d/zzz-$PKG_NAME-$PKG_VERSION-plugins.sh
cp $RECIPE_DIR/zzz-blender-plugin-sync-deactivate.sh \
$PREFIX/etc/conda/deactivate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh
4 changes: 2 additions & 2 deletions conda_recipes/blender-5.1/recipe/test_zzz_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
set -eo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ACTIVATE_SCRIPT="$SCRIPT_DIR/zzz-blender-plugins-activate.sh"
DEACTIVATE_SCRIPT="$SCRIPT_DIR/zzz-blender-plugins-deactivate.sh"
ACTIVATE_SCRIPT="$SCRIPT_DIR/zzz-blender-plugin-sync-activate.sh"
DEACTIVATE_SCRIPT="$SCRIPT_DIR/zzz-blender-plugin-sync-deactivate.sh"

PASS_COUNT=0
FAIL_COUNT=0
Expand Down
4 changes: 2 additions & 2 deletions conda_recipes/maya-2026/recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ EOF
# See zzz-maya-plugin-sync-activate.sh for the full implementation.
mkdir -p "$PREFIX/etc/conda/activate.d"
cp $RECIPE_DIR/zzz-maya-plugin-sync-activate.sh \
$PREFIX/etc/conda/activate.d/zzz-$PKG_NAME-plugin-sync.sh
$PREFIX/etc/conda/activate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh

mkdir -p "$PREFIX/etc/conda/deactivate.d"
cp $RECIPE_DIR/zzz-maya-plugin-sync-deactivate.sh \
$PREFIX/etc/conda/deactivate.d/zzz-$PKG_NAME-plugin-sync.sh
$PREFIX/etc/conda/deactivate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,31 @@ if [ "$(uname -s)" = "MINGW"* ] || [ "$(uname -s)" = "MSYS"* ] || [ -n "${OS:-}"
fi

# Determine plugin download directory
_SP_PLUGIN_DIR="${OPENJD_SESSION_WORKING_DIR:-${TMPDIR:-/tmp}}/.maya-plugins"
_SP_PLUGIN_DIR="${OPENJD_SESSION_WORKING_DIR:-${TMPDIR:-/tmp}}/deadline-plugins/maya"
mkdir -p "$_SP_PLUGIN_DIR"

# Download generic plugins to the session working directory
_SP_GENERIC_DIR="${OPENJD_SESSION_WORKING_DIR:-${TMPDIR:-/tmp}}/deadline-plugins/generic"
_SP_GENERIC_SRC="s3://${DEADLINE_JA_S3_BUCKET}/${_SP_PREFIX}plugins/generic/"
if [ -n "${OPENJD_SESSION_WORKING_DIR:-}" ]; then
if aws s3 ls "$_SP_GENERIC_SRC" >/dev/null 2>&1; then
echo "Plugin Sync: Downloading plugins from $_SP_GENERIC_SRC"
aws s3 cp "$_SP_GENERIC_SRC" "$OPENJD_SESSION_WORKING_DIR/" --recursive --quiet 2>/dev/null || true
aws s3 cp "$_SP_GENERIC_SRC" "$_SP_GENERIC_DIR" --recursive --quiet 2>/dev/null || true
fi
fi

# Download Maya-specific plugins
_SP_DCC_SRC="s3://${DEADLINE_JA_S3_BUCKET}/${_SP_PREFIX}plugins/${_SP_OS}/maya/${MAYA_VERSION}/"
_SP_MAYA_DIR="$_SP_PLUGIN_DIR/maya"
mkdir -p "$_SP_MAYA_DIR"

if aws s3 ls "$_SP_DCC_SRC" >/dev/null 2>&1; then
echo "Plugin Sync: Downloading Maya plugins from $_SP_DCC_SRC"
aws s3 cp "$_SP_DCC_SRC" "$_SP_MAYA_DIR/" --recursive --quiet 2>/dev/null || true
aws s3 cp "$_SP_DCC_SRC" "$_SP_PLUGIN_DIR/" --recursive --quiet 2>/dev/null || true
fi

# Append to MAYA_MODULE_PATH if we downloaded any files
if [ -d "$_SP_MAYA_DIR" ] && [ -n "$(ls -A "$_SP_MAYA_DIR" 2>/dev/null)" ]; then
export MAYA_MODULE_PATH="${_SP_MAYA_DIR}:${MAYA_MODULE_PATH:-}"
echo "Plugin Sync: MAYA_MODULE_PATH updated with $_SP_MAYA_DIR"
if [ -d "$_SP_PLUGIN_DIR" ] && [ -n "$(ls -A "$_SP_PLUGIN_DIR" 2>/dev/null)" ]; then
export MAYA_MODULE_PATH="${_SP_PLUGIN_DIR}:${MAYA_MODULE_PATH:-}"
echo "Plugin Sync: MAYA_MODULE_PATH updated with $_SP_PLUGIN_DIR"
else
echo "Plugin Sync: No Maya plugins found, skipping."
fi
Expand All @@ -59,4 +58,4 @@ fi
export _MAYA_PLUGIN_SYNC_DIR="$_SP_PLUGIN_DIR"

# Clean up temp variables
unset _SP_PREFIX _SP_OS _SP_PLUGIN_DIR _SP_GENERIC_SRC _SP_DCC_SRC _SP_MAYA_DIR
unset _SP_PREFIX _SP_OS _SP_PLUGIN_DIR _SP_GENERIC_SRC _SP_DCC_SRC
108 changes: 108 additions & 0 deletions conda_recipes/nuke-17.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Nuke 17.0 Conda Recipe for AWS Deadline Cloud

## Overview

This directory contains a conda build recipe for Nuke 17.0.1, specifically configured for use with AWS Deadline Cloud. With this package you can run Nuke compositing and processing jobs on Deadline Cloud service-managed fleets.

## Package Information

- **Application**: Nuke 17.0v1
- **Supported Platforms**: linux-64
- **Source**: Foundry website downloads
- **License**: Commercial
- **Build Tool**: rattler-build

## Prerequisites

Before building this package, ensure you have:

1. **AWS Deadline Cloud infrastructure** set up with:
- A farm configured for package building
- A queue. If you followed the [setup instructions](../README.md#infrastructure-setup-prerequisites) it will be named "Package Build Queue" (or specify the queue name with `-q`)
- Linux-64 fleet for building linux packages

2. **Deadline Cloud CLI** installed on your workstation

3. **Source archive** (see [Archive File Instructions](#archive-file-instructions) below)

4. **Foundry account** for downloading Nuke installer

## Archive File Instructions

### Download from Foundry (Required)
1. Download the `Nuke17.0v1-linux-x86_64.tgz` from the Foundry website.
2. You will need a Foundry account to access the Nuke downloads.
3. Place the downloaded file in the `conda_recipes/archive_files` directory.
4. Conda uses the a checksum to verify the integrity of the source file. The SHA256 hash should match: `c76ec0cd3f881f41553878240618a983e936e543a5fd19ceea6c5c6765cc88a3`.
In bash, you can compute the checksum by running this command `sha256sum Nuke17.0v1-linux-x86_64.tgz`.

## Plugins

### OpenFX Plugins
To use OpenFX Plugins with Nuke, place the `.bundle` files into a known directory in $PREFIX. Set the OFX_PLUGIN_PATH environment variable to that directory and install any required dependencies.

#### Example OFX Plugin
- [Nuke - De:Noise](../nuke-denoise/)

## Adapting to Other Versions

### Version Update Checklist

To adapt this recipe for a different Nuke version, e.g. 15:

1. **Update Version Information**
```
# In recipe/recipe.yaml
context:
version_partial: "15.0"
version_minor: "1"

# In deadline-cloud.yaml
sourceArchiveFilename: Nuke15.0v1-linux-x86_64.tgz
```

2. **Update Source Archives**
- Download new version archives from Foundry
- Update SHA256 hashes in `recipe.yaml`
- Update source filename in `deadline-cloud.yaml`

3. **Check Dependencies**
- Review and update system dependency versions
- Test compatibility with existing plugins
- Update minimum system requirements

4. **Update Build Scripts**
- Check for changes in installation directory structure
- Update file copy operations in build scripts
- Verify environment variable paths in activation scripts

### Common Version Migration Issues

- **Path Changes**: Installation directories may change between versions
- **Dependency Updates**: New versions may require different system libraries
- **Plugin API Changes**: Plugin interfaces may be incompatible between major versions
- **License Changes**: Licensing requirements may change

## Recipe Structure

```
nuke-17.0/
├── README.md # This file
├── deadline-cloud.yaml # Deadline Cloud configuration
└── recipe/
├── recipe.yaml # Conda package metadata
├── build.sh # Linux build script
├── zzz-nuke-plugin-sync-activate.sh # activate script for Plugin Sync feature
└── zzz-nuke-plugin-sync-deactivate.sh # deactivate script for Plugin Sync feature
```

## Resources

- **Nuke Documentation**: https://learn.foundry.com/nuke/
- **AWS Deadline Cloud Developer Guide**: https://docs.aws.amazon.com/deadline-cloud/latest/developerguide/
- **Conda Build Documentation**: https://docs.conda.io/projects/conda-build/
- **Plugin Development**: https://learn.foundry.com/nuke/developers/

---

**Note**: This recipe is specifically configured for Nuke 17.0.1 on Linux x86_64 platforms. The build process automatically handles EULA acceptance and system dependency installation.
6 changes: 6 additions & 0 deletions conda_recipes/nuke-17.0/deadline-cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
condaPlatforms:
- platform: linux-64
defaultSubmit: true
sourceArchiveFilename: Nuke17.0v1-linux-x86_64.tgz
sourceDownloadInstructions: 'Download the Nuke17.0v1-linux-x86_64 full download file from the Foundry. You will need a Foundry account to access the Nuke downloads.'
buildTool: rattler-build
100 changes: 100 additions & 0 deletions conda_recipes/nuke-17.0/recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/sh
set -xeuo pipefail

mkdir -p $PREFIX/opt
cd $PREFIX/opt

# Install Nuke into $PREFIX/opt
INSTALLER=$SRC_DIR/installer/*.run
env -u SRC_DIR -u PREFIX $INSTALLER --prefix $PREFIX/opt --accept-foundry-eula

NUKE_DIR=$PREFIX/opt/Nuke*
NUKE_BIN=$(basename $NUKE_DIR/Nuke*)
NUKE_VERSION=${NUKE_BIN#Nuke}

# Remove the documentation, it's not needed on the farm
rm -r $NUKE_DIR/Documentation

# Create symlinks
mkdir -p $PREFIX/bin
ln -r -s $NUKE_DIR/$NUKE_BIN $PREFIX/bin/$NUKE_BIN
ln -r -s $NUKE_DIR/$NUKE_BIN $PREFIX/bin/nuke

# Install Nuke dependencies from local package manager
mkdir -p $SRC_DIR/download
cd $SRC_DIR/download
yumdownloader --resolve --destdir=$SRC_DIR/download alsa-lib libglvnd-opengl
for rpm_file in $(realpath $SRC_DIR/download/*.rpm); do
rpm2cpio "$rpm_file" | cpio -idm
done

# Copy .so's to Nuke installation
for so_file in $(find . -iname "*.so.*"); do
cp $so_file $NUKE_DIR/.
done

# Script to set environment variables during activation
mkdir -p $PREFIX/etc/conda/activate.d
cat <<EOF > $PREFIX/etc/conda/activate.d/nuke-$NUKE_VERSION-vars.sh
internal_package_add_to_search_path () {
# Add a path to a new or existing environment variable.
# For example, we use this to add a plugin path to the NUKE_PATH
# Usage: internal_package_add_to_search_path VAR_NAME /seach/path/value
eval "CURRENT_VALUE=\\\${\$1:-}"
if [ "\$CURRENT_VALUE" = "" ]; then
eval "export \"\$1=\\\$2\""
else
NEW_VALUE="\$CURRENT_VALUE:\$2"
eval "export \"\$1=\\\$NEW_VALUE\""
fi
}

export "NUKE_LOCATION=\$CONDA_PREFIX/opt/$(basename $NUKE_DIR)"
export "NUKE_VERSION=$NUKE_VERSION"
export "NUKE_BINARY_PATH=\$NUKE_LOCATION/bin"
export "NUKE_INCLUDE_PATH=\$NUKE_LOCATION/include"
export "NUKE_LIBRARY_PATH=\$NUKE_LOCATION/lib"
internal_package_add_to_search_path NUKE_PATH "\$NUKE_LOCATION/plugins"

unset -f internal_package_add_to_search_path
EOF

mkdir -p $PREFIX/etc/conda/deactivate.d
cat <<EOF > $PREFIX/etc/conda/deactivate.d/nuke-$NUKE_VERSION-vars.sh
internal_package_remove_from_search_path () {
# Removes the given path from the given environment variable.
# For example, we use this to clean up the NUKE_PATH we changed in the activate script.
# Usage: internal_package_remove_from_search_path VAR_NAME /seach/path/value
eval "CURRENT_VALUE=\\\$\$1"
if [ "\$CURRENT_VALUE" = "\$2" ]; then
eval "unset \$1"
else
NEW_VALUE="\$(echo ":\$CURRENT_VALUE:" | sed -e "s|:\$2:|:|")"
NEW_VALUE="\${NEW_VALUE%:}"
NEW_VALUE="\${NEW_VALUE#:}"
eval "export \"\$1=\\\$NEW_VALUE\""
fi
}

internal_package_remove_from_search_path NUKE_PATH "\$NUKE_LOCATION/plugins"
unset NUKE_LIBRARY_PATH
unset NUKE_INCLUDE_PATH
unset NUKE_BINARY_PATH
unset NUKE_VERSION
unset NUKE_LOCATION

unset -f internal_package_remove_from_search_path
EOF

# --- Simple Plugin Delivery (Option D: per-DCC recipe activate script) ---
# Copies the plugin delivery scripts into the conda activate.d/deactivate.d
# directories. These run AFTER the main nuke env vars are set (zzz- prefix
# ensures lexicographic ordering).

mkdir -p $PREFIX/etc/conda/activate.d
cp $RECIPE_DIR/zzz-nuke-plugin-sync-activate.sh \
$PREFIX/etc/conda/activate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh

mkdir -p $PREFIX/etc/conda/deactivate.d
cp $RECIPE_DIR/zzz-nuke-plugin-sync-deactivate.sh \
$PREFIX/etc/conda/deactivate.d/zzz-$PKG_NAME-$PKG_VERSION-plugin-sync.sh
27 changes: 27 additions & 0 deletions conda_recipes/nuke-17.0/recipe/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
context:
version_partial: "17.0"
version_minor: "1"

package:
name: nuke
version: ${{ version_partial + "." + version_minor }}

source:
path: ../../archive_files/Nuke${{ version_partial }}v${{ version_minor }}-linux-x86_64.tgz
sha256: c76ec0cd3f881f41553878240618a983e936e543a5fd19ceea6c5c6765cc88a3
target_directory: installer

build:
number: 0
dynamic_linking:
binary_relocation: False
missing_dso_allowlist:
- "*"
prefix_detection:
ignore_binary_files: True
# The binary is built to be relocatable, so can ignore the warnings about DSOs.

about:
homepage: https://www.foundry.com/products/nuke-family/nuke
license: LicenseRef-FoundryEULA
summary: Nuke is the powerful node-based compositing tool at the heart of the Nuke family.
61 changes: 61 additions & 0 deletions conda_recipes/nuke-17.0/recipe/zzz-nuke-plugin-sync-activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
# Simple Plugin Delivery for Nuke
# Downloads plugin files from S3 and configures NUKE_PATH.
# Adds the plugin directory (for .gizmo files) and each subdirectory
# (for folder-based plugins with init.py) to NUKE_PATH.
#
# S3 convention: s3://<bucket>/<prefix>/plugins/<os>/nuke/<version>/
#
# Required environment variables (set by the worker agent):
# DEADLINE_JA_S3_BUCKET - Job attachment S3 bucket name
# DEADLINE_JA_ROOT_PREFIX - Job attachment root prefix in the bucket
# OPENJD_SESSION_WORKING_DIR - Session working directory path

if [ -z "${DEADLINE_JA_S3_BUCKET:-}" ] || [ -z "${NUKE_VERSION:-}" ]; then
echo "Plugin Sync: Skipping — DEADLINE_JA_S3_BUCKET or NUKE_VERSION not set."
return 0 2>/dev/null || exit 0
fi

_SP_PREFIX="${DEADLINE_JA_ROOT_PREFIX:+${DEADLINE_JA_ROOT_PREFIX}/}"
_SP_OS="linux"
if [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]] || [ -n "${OS:-}" ]; then
_SP_OS="windows"
fi

_SP_PLUGIN_DIR="${OPENJD_SESSION_WORKING_DIR:-${TMPDIR:-/tmp}}/deadline-plugins/nuke"
mkdir -p "$_SP_PLUGIN_DIR"

# Download generic plugins
_SP_GENERIC_DIR="${OPENJD_SESSION_WORKING_DIR:-${TMPDIR:-/tmp}}/deadline-plugins/generic"
_SP_GENERIC_SRC="s3://${DEADLINE_JA_S3_BUCKET}/${_SP_PREFIX}plugins/generic/"
if aws s3 ls "$_SP_GENERIC_SRC" >/dev/null 2>&1; then
mkdir -p "$_SP_GENERIC_DIR"
echo "Plugin Sync: Downloading generic plugins from $_SP_GENERIC_SRC" >&2
aws s3 cp "$_SP_GENERIC_SRC" "$_SP_GENERIC_DIR/" --recursive --quiet 2>/dev/null || true
fi

# Download Nuke-specific plugins
_SP_DCC_SRC="s3://${DEADLINE_JA_S3_BUCKET}/${_SP_PREFIX}plugins/${_SP_OS}/nuke/${NUKE_VERSION}/"
if aws s3 ls "$_SP_DCC_SRC" >/dev/null 2>&1; then
echo "Plugin Sync: Downloading Nuke plugins from $_SP_DCC_SRC"
aws s3 cp "$_SP_DCC_SRC" "$_SP_PLUGIN_DIR/" --recursive --quiet 2>/dev/null || true
fi

# Build NUKE_PATH: parent dir (for .gizmo files) + each subdir (for folder plugins)
if [ -d "$_SP_PLUGIN_DIR" ] && [ "$(ls -A "$_SP_PLUGIN_DIR" 2>/dev/null)" ]; then
_SP_SEP=":"
[[ "$_SP_OS" == "windows" ]] && _SP_SEP=";"

_SP_PATHS="$_SP_PLUGIN_DIR"
for _d in "$_SP_PLUGIN_DIR"/*/; do
[ -d "$_d" ] && _SP_PATHS="${_SP_PATHS}${_SP_SEP}${_d%/}"
done

export NUKE_PATH="${NUKE_PATH:+${NUKE_PATH}${_SP_SEP}}${_SP_PATHS}"
export _SP_PLUGIN_DIR
echo "Plugin Sync: NUKE_PATH=$NUKE_PATH"
else
echo "Plugin Sync: No Nuke plugins found, skipping."
fi

unset _SP_PREFIX _SP_OS _SP_DCC_SRC _SP_SEP _SP_PATHS _d
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Simple Plugin Delivery cleanup for Nuke
# Unsets env vars.

unset _SP_PLUGIN_DIR _SP_GENERIC_DIR _SP_PARENT
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these env vars used anywhere?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used, and unset at line 61 above. This file is totally optional. I imagine AE being the only one we should clean up.

Loading