Pixyz SDK Scheduler is a distributed task scheduling system tailored for 3D workflows. It integrates natively with Pixyz SDK (Python). It triggers tasks via REST API and automates processing on local/cloud infrastructure.
- Robust, scalable, low-latency 3D task manager
- Optimized cost/performance via smart task placement
- Simplified dev-to-prod pipeline
- Supports advanced DAG-based processing
The Pixyz SDK Scheduler is a powerful toolkit designed for orchestrating and executing decentralized tasks across a network of specialized workers. Tailored for seamless integration with the Pixyz framework, this toolkit empowers users to effortlessly submit jobs to distributed workers via an intuitive API.
Each worker operates independently to execute assigned tasks, with jobs routed to specific queues based on their computing needs, such as cpu or gpu. Workers actively monitor these queues for incoming assignments, ensuring efficient task allocation and execution. Leveraging the robust Celery framework, the Pixyz SDK Scheduler efficiently manages and coordinates workers, guaranteeing smooth task execution.
The Pixyz Scheduler uses the producer-consumer pattern to distribute tasks to workers.
- The user submits a task/job defined by a python script and if needed a 3D file, and it put it through the HTTP API.
- The Pixyz Scheduler create a task/job
- The new jobs is placed to the requested queue.
- The workers are listening to new tasks in the queue(s) and process them according to their priorities.
- The workers execute the task and save the result
- The API can read the result and send it back to the user.
This guide will get you up and running with Pixyz SDK Scheduler in under 15 minutes.
Before you begin, make sure you have:
- Python 3.8+ installed
- A valid Pixyz license (NodeLock or FlexLM)
- Redis server (we'll help you install this)
- 10GB free disk space
Perfect for learning and testing. Everything runs on your machine.
Pros:
- ✅ Quick setup (10 minutes)
- ✅ Easy debugging
- ✅ Works offline
- ✅ Full control over components
Cons:
- ❌ Limited to single machine
- ❌ Manual scaling
Option B: Docker Compose (Recommended for production)
Containerized setup that's production-ready.
Pros:
- ✅ Easy deployment
- ✅ Consistent environment
- ✅ Easy scaling
- ✅ Isolated components
Cons:
- ❌ Requires Docker knowledge
- ❌ Less debugging flexibility
For this getting started, we'll continue with local development option. Please refere this page for contenainerized setup: Quick Docker Setup
On Windows:
# Install Windows Subsystem for Linux (WSL2) if not done previously
wsl --install
# Install Ubuntu on Windows if not done previously
# Then in WSL2 command invite:
sudo apt update
sudo apt install redis-server
sudo systemctl start redis-server # next time you reboot, you'll only need to start the redis-serverOn Linux (Ubuntu/Debian):
sudo apt update
sudo apt install redis-server
sudo systemctl start redis-server
sudo systemctl enable redis-serverInstall distutils for Linux: sudo apt-get install python3-distutils or similar for Windows.
# 1. Create and activate virtual environment
python -m venv pixyz-scheduler
source pixyz-scheduler/bin/activate # On Windows: pixyz-scheduler\Scripts\activate
# 2. Install packages
# Clone or download the repository first
pip install -r pixyz_api/requirements.txt
pip install -r pixyz_worker/requirements.txt
# 3. Create configuration file
cp pixyz-scheduler.conf.example pixyz-scheduler.conf # on Windows use "copy" insread of "cp"Edit pixyz-scheduler.conf:
# Redis Configuration
REDIS_MASTER_SERVICE_HOST=127.0.0.1
REDIS_MASTER_SERVICE_PORT=6379
REDIS_PASSWORD=
# API Configuration
API_PORT=8001
GOD_PASSWORD_SHA256=your_hashed_password_here
# Pixyz Configuration
PIXYZ_PYTHON_PATH=/path/to/your/pixyz/installation
LICENSE_FLEXLM=false # Set to true if using FlexLM
LICENSE_HOST=your_license_server # If using FlexLM
LICENSE_PORT=27000 # If using FlexLM
# Storage
SHARE_PATH=./share
PROCESS_PATH=./pixyz_api/processes On Linux/macOS:
echo -n "your_secret_password" | sha256sumOn Windows Powershell:
$password = "your_secret_password"
$hasher = [System.Security.Cryptography.SHA256]::Create()
$hash = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($password))
[System.BitConverter]::ToString($hash).Replace("-", "").ToLower()Copy the hash to GOD_PASSWORD_SHA256 in your config file.
Open three terminal windows:
source pixyz-scheduler/bin/activate # Activate virtual environment
python api.pyYou should see:
INFO: Started server process [2064]
INFO: Uvicorn running on http://0.0.0.0:8001
source pixyz-scheduler/bin/activate # Activate virtual environment
python worker.pyYou should see:
-------------- worker@your-computer v5.3.6
--- ***** -----
-- ******* ----
[2024-07-02 15:41:00] Pixyz ComputeEngine v2024.2.0.19
# Test API connectivity
curl http://localhost:8001/
# List available processes
curl -H "x-api-key: your_secret_password" http://localhost:8001/processes# Submit a simple test job
python ./client.py --url http://localhost:8001 process -n sleep -t your_secret_password -wr
# Convert a 3D file (if you have one)
python ./client.py --url http://localhost:8001 process -n convert_file -i path/to/your/model.fbx -t your_secret_password -rw
# Execute a custom python script
python ./client.py -u http://127.0.0.1:8001 exec -t your_secret_password -s ./scripts/tutorial/00_convert_a_file.py -i D:\\Models\\cube.cgr -rw- Open http://localhost:8001/docs in your browser
- Click the lock icon and enter
your_secret_password - Try the
/processesendpoint to see available processes - Submit a job using the
/jobsPOST endpoint
- API Documentation: http://localhost:8001/docs
- Flower Monitor (if installed): http://localhost:5555
# List all jobs
python ./client.py --url http://localhost:8001 jobs -t your_secret_password
# Check specific job status
python ./client.py --url http://localhost:8001 status -j [job-uuid] -t your_secret_password
# Download job outputs
python ./client.py --url http://localhost:8001 download -j [job-uuid] -f output.glb -o /myFolder/output.glb -t your_secret_passwordProblem: Redis isn't running
Solution: Start Redis: sudo systemctl start redis-server
Problem: Pixyz license not configured
Solution: Check PIXYZ_PYTHON_PATH and run PiXYZFinishInstall
Problem: Wrong API password
Solution: Verify GOD_PASSWORD_SHA256 hash matches your password
Problem: Worker not connected to Redis
Solution: Check Redis configuration in pixyz-scheduler.conf
Problem: Worker cannot find Pixyz SDK installation path
Solution: Check PIXYZ_PYTHON_PATH. Example on Windows: PIXYZ_PYTHON_PATH="D:\\PiXYZAPI-2025.2.0.1-win64\\bin"
- Configure shared storage (NFS/cloud storage)
- Set up monitoring (Flower, Prometheus)
- Configure SSL/TLS for API
- Set up backup for Redis data
- Configure log rotation
- Set up health checks
- Check logs: Look in the terminal output for error messages
- Verify configuration: Double-check
pixyz-scheduler.conf - Test components individually: Redis, API, Worker
- Check firewall: Ensure ports 6379 (Redis) and 8001 (API) are open
🎉 Congratulations! You now have a working Pixyz SDK Scheduler setup. Ready to process some 3D files?
- The HTTP API does not implement a secure authentication protocol like OAuth but uses a simple hash control to avoid direct exposure.
- You MUST NOT expose the API to the public internet without access list control and/or implementing your own authentication mechanism.
- Keep in mind, anyone who has access to the API is able to execute any Python code!
Thank you for your interest in this project. This repository is maintained for distribution purposes, and all development is managed internally.
As such, we cannot accept or respond to any of the following on GitHub:
- Pull Requests
- Code Review Requests
- Issues or bug reports
Any submissions of this nature will be closed. If you require support or wish to provide feedback, please use our official support channels.
