This OpenJD job template allows users to run VTK (Visualization Toolkit) Python scripts using AWS Deadline Cloud.
This job template is designed to be generalizable for any VTK-based Python script that:
- Accepts command-line parameters for output path, width, and height
- Saves visualization output to a specified location
The template accepts a user-provided Python script and runs it with the specified parameters, saving the visualization output to the designated location.
- InputDir: Directory containing the VTK script and any additional required files
- InputScript: Name of the Python script to run (must be in the input directory)
- OutputDir: Directory where the visualization output will be saved
- OutputFilename: Name of the output image file
- Width: Width of the output image in pixels (default: "1280")
- Height: Height of the output image in pixels (default: "720")
- CondaPackages: Conda packages to install (default: "vtk numpy"). These packages must be available in the Conda Channels configured in the queue environment
- ExtraParams: Additional parameters to pass to the script (format:
--param1 value1 --param2 value2)
-
Prepare a VTK Python script that includes command-line arguments for:
--output: Output file path--width: Image width--height: Image height
-
Submit the job with:
- InputDir: Directory containing your VTK script
- InputScript: Filename of your script
- OutputDir: Where to save the visualization
- OutputFilename: Name for the output file
- Any other parameters your script requires via ExtraParams
Your VTK script should:
- Accept the parameters
--output,--width, and--height - Save output to the location specified by
--output - Use VTK for visualization
A sample VTK script (flow_simulation_visualization.py) is provided in the sample directory that demonstrates:
- Creating a 3D airfoil geometry
- Generating a flow field
- Calculating pressure distribution
- Visualizing the simulation with streamlines
- Saving the output as an image file This script is sourced from here and is licensed under the MIT license.