|
| 1 | +--- |
| 2 | +title: AI Framework Support |
| 3 | +description: |
| 4 | + Comprehensive guide to AI framework compatibility and support on the iExec |
| 5 | + platform |
| 6 | +--- |
| 7 | + |
| 8 | +# 🤖 AI Framework Support |
| 9 | + |
| 10 | +The iExec Platform provides comprehensive support for popular AI and machine |
| 11 | +learning frameworks. Deploy confidential AI with ease. iExec supports popular |
| 12 | +AI/ML frameworks, running in secure Trusted Execution Environments (TEEs) with |
| 13 | +optimized configurations. |
| 14 | + |
| 15 | +## 🚀 Quick Start |
| 16 | + |
| 17 | +**Want to get started immediately?** |
| 18 | + |
| 19 | +- 📚 |
| 20 | + **[AI Frameworks Hello World](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world)** - |
| 21 | + Ready-to-use Docker examples for TensorFlow, PyTorch, and more |
| 22 | +- 🛠️ **[Build & Deploy](/guides/build-iapp/build-&-deploy)** - General iApp |
| 23 | + development guide (not AI-specific) |
| 24 | +- 🔬 |
| 25 | + **[TDX App Guide](/guides/build-iapp/advanced/create-your-first-tdx-app)** - |
| 26 | + Build TDX applications (works well for AI workloads) |
| 27 | + |
| 28 | +## 🛡️ Why iExec for AI? |
| 29 | + |
| 30 | +### Confidential Computing |
| 31 | + |
| 32 | +Trusted Execution Environments (TEEs) protect your AI models and data |
| 33 | +end-to-end: |
| 34 | + |
| 35 | +- **Data Privacy**: TEEs isolate AI computations in secure enclaves |
| 36 | +- **Secure Training & Inference**: Unauthorized entities can never access your |
| 37 | + models and data |
| 38 | +- **Hardware-Level Security**: Intel SGX and TDX provide enterprise-grade |
| 39 | + protection |
| 40 | + |
| 41 | +### AI Monetization |
| 42 | + |
| 43 | +Monetize your AI assets easily and securely: |
| 44 | + |
| 45 | +- **Datasets**: Encrypt and sell access to your training data |
| 46 | +- **Models**: Deploy and monetize your trained AI models |
| 47 | +- **Agents**: Create and sell AI agents and applications |
| 48 | +- **Ownership Preserved**: Your digital assets always remain yours |
| 49 | + |
| 50 | +### Decentralized Infrastructure |
| 51 | + |
| 52 | +Scale AI applications without centralized cloud dependencies: |
| 53 | + |
| 54 | +- **On-Demand Compute**: Access powerful resources when you need them |
| 55 | +- **Fair Pricing**: Blockchain verifies execution costs transparently |
| 56 | +- **Global Network**: Deploy across a worldwide network of secure workers |
| 57 | + |
| 58 | +## 🤖 AI Framework Support |
| 59 | + |
| 60 | +### Overview |
| 61 | + |
| 62 | +| Framework | TDX Support | SGX Support | Best For | |
| 63 | +| ---------------- | --------------- | --------------- | ----------------------------- | |
| 64 | +| **TensorFlow** | ✅ Yes (3.01GB) | ❌ No | Deep learning, production ML | |
| 65 | +| **PyTorch** | ✅ Yes (6.44GB) | ❌ No | Research, computer vision | |
| 66 | +| **Scikit-learn** | ✅ Yes (1.18GB) | ✅ Yes (1.01GB) | Traditional ML, data analysis | |
| 67 | +| **OpenVINO** | ✅ Yes (1.82GB) | ❌ No | Computer vision, inference | |
| 68 | +| **NumPy** | ✅ Yes (1.25GB) | ✅ Yes (1.08GB) | Scientific computing | |
| 69 | +| **Matplotlib** | ✅ Yes (1.25GB) | ✅ Yes (1.08GB) | Data visualization | |
| 70 | + |
| 71 | +### Framework Details |
| 72 | + |
| 73 | +| Framework | Version | Description | TDX Support | SGX Support | Use Cases | Resources | |
| 74 | +| ---------------- | ----------- | --------------------------------------------- | ----------- | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 75 | +| **TensorFlow** | 2.19.0 | Google's ML framework for production AI | ✅ 3.01GB | ❌ Too large | Deep learning, CV, NLP | [Docs](https://www.tensorflow.org/) • [Quickstart](https://www.tensorflow.org/tutorials/quickstart/beginner) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/tensorflow) | |
| 76 | +| **PyTorch** | 2.7.0+cu126 | Facebook's research-focused DL framework | ✅ 6.44GB | ❌ Too large | Research, DL, CV, NLP | [Docs](https://pytorch.org/docs/) • [Quickstart](https://docs.pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/pytorch) | |
| 77 | +| **Scikit-learn** | 1.6.1 | Comprehensive ML library for Python | ✅ 1.18GB | ✅ 1.01GB | Classification, regression, clustering | [Docs](https://scikit-learn.org/stable/) • [Examples](https://scikit-learn.org/stable/auto_examples/index.html) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/scikit) | |
| 78 | +| **OpenVINO** | 2024.6.0 | Intel's high-performance AI inference toolkit | ✅ 1.82GB | ❌ Execution issues | Computer vision, inference | [Docs](https://docs.openvino.ai/) • [Tutorial](https://docs.openvino.ai/2023.3/notebooks/004-hello-detection-with-output.html) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/openvino) | |
| 79 | +| **NumPy** | 2.0.2 | Fundamental package for scientific computing | ✅ 1.25GB | ✅ 1.08GB | Scientific computing, data analysis | [Docs](https://numpy.org/doc/) • [User Guide](https://numpy.org/doc/stable/user/index.html) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/numpy) | |
| 80 | +| **Matplotlib** | 3.9.4 | Comprehensive library for data visualization | ✅ 1.25GB | ✅ 1.08GB | Data visualization, plotting | [Docs](https://matplotlib.org/) • [Gallery](https://matplotlib.org/stable/gallery/index.html) • [Docker](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world/tree/main/matplotlib) | |
| 81 | + |
| 82 | +## 🐳 Getting Started with Docker Examples |
| 83 | + |
| 84 | +### What's Included |
| 85 | + |
| 86 | +Our |
| 87 | +[AI Frameworks Hello World repository](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world) |
| 88 | +includes ready-to-use examples: |
| 89 | + |
| 90 | +``` |
| 91 | +ai-frameworks-hello-world/ |
| 92 | +├── tensorflow/ # TensorFlow 2.19.0 example |
| 93 | +├── pytorch/ # PyTorch 2.7.0+cu126 example |
| 94 | +├── scikit/ # Scikit-learn 1.6.1 example |
| 95 | +├── openvino/ # OpenVINO 2024.6.0 example |
| 96 | +├── numpy/ # NumPy 2.0.2 example |
| 97 | +└── matplotlib/ # Matplotlib 3.9.4 example |
| 98 | +``` |
| 99 | + |
| 100 | +### Quick Start Commands |
| 101 | + |
| 102 | +```bash |
| 103 | +# Clone the repository |
| 104 | +git clone https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world.git |
| 105 | +cd ai-frameworks-hello-world |
| 106 | + |
| 107 | +# Try TensorFlow example |
| 108 | +cd tensorflow |
| 109 | +docker build -t hello-tensorflow . |
| 110 | +docker run --rm hello-tensorflow |
| 111 | + |
| 112 | +# Try PyTorch example |
| 113 | +cd ../pytorch |
| 114 | +docker build -t hello-pytorch . |
| 115 | +docker run --rm hello-pytorch |
| 116 | +``` |
| 117 | + |
| 118 | +### Features |
| 119 | + |
| 120 | +- **✅ Isolated Testing**: Each framework runs in its own container |
| 121 | +- **✅ Reproducible**: Consistent environment across systems |
| 122 | +- **✅ TDX Ready**: All containers tested for Intel TDX compatibility |
| 123 | +- **✅ Easy Deployment**: Simple build and run commands |
| 124 | + |
| 125 | +## 📊 Technology Comparison |
| 126 | + |
| 127 | +### TDX vs SGX for AI |
| 128 | + |
| 129 | +| Feature | Intel TDX | Intel SGX | |
| 130 | +| --------------------- | -------------------------- | ---------------------------------- | |
| 131 | +| **Memory Limit** | Multi-GB+ | ~1.95GB | |
| 132 | +| **Framework Support** | All major frameworks | Limited (Scikit-learn, NumPy) | |
| 133 | +| **Code Changes** | Minimal ("lift and shift") | Significant modifications required | |
| 134 | +| **Production Ready** | ✅ Yes | ⚠️ Limited | |
| 135 | +| **AI Workloads** | ✅ Excellent | ❌ Restricted | |
| 136 | + |
| 137 | +### Recommendations |
| 138 | + |
| 139 | +#### For Production AI Applications |
| 140 | + |
| 141 | +- **Use TDX** for TensorFlow, PyTorch, and OpenVINO |
| 142 | +- **Use SGX** for lightweight ML with Scikit-learn and NumPy |
| 143 | + |
| 144 | +#### For Development and Testing |
| 145 | + |
| 146 | +- **Start with SGX** for simple ML tasks |
| 147 | +- **Migrate to TDX** for complex AI workloads |
| 148 | + |
| 149 | +#### Important Considerations |
| 150 | + |
| 151 | +- **SGX Limitations**: Expect potential library incompatibilities and code |
| 152 | + modifications |
| 153 | +- **TDX Advantages**: Minimal code changes required ("lift and shift" approach) |
| 154 | + |
| 155 | +## 📚 Next Steps |
| 156 | + |
| 157 | +### Learn TEE Technologies |
| 158 | + |
| 159 | +- **[Intel SGX Technology](/protocol/tee/intel-sgx)** - SGX limitations and |
| 160 | + capabilities |
| 161 | +- **[Intel TDX Technology](/protocol/tee/intel-tdx)** - TDX advantages for AI |
| 162 | +- **[SGX vs TDX Comparison](/protocol/tee/sgx-vs-tdx)** - Detailed comparison |
| 163 | + |
| 164 | +### Build AI Applications |
| 165 | + |
| 166 | +- **[Build & Test](/guides/build-iapp/build-&-test)** - Build and test your AI |
| 167 | + application |
| 168 | +- **[Deploy & Run](/guides/build-iapp/deploy-&-run)** - Deploy and run your AI |
| 169 | + application |
| 170 | +- **[Build Intel TDX App](/guides/build-iapp/advanced/build-your-first-tdx-iapp)** - |
| 171 | + TDX applications for AI workloads |
| 172 | +- **[Inputs and Outputs](/guides/build-iapp/inputs-and-outputs)** - Handle data |
| 173 | + flow in TEE environment |
| 174 | + |
| 175 | +### Explore Examples |
| 176 | + |
| 177 | +- **[AI Frameworks Hello World](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world)** - |
| 178 | + Ready-to-use Docker examples |
| 179 | +- **[iExec Discord](https://discord.com/invite/pbt9m98wnU)** - Community support |
0 commit comments