-
Notifications
You must be signed in to change notification settings - Fork 2
Feat: ai frameworks #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b279ccb
4024560
0beee8d
4d5fe8c
7b410f0
8a73d69
27c75d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| --- | ||
| title: AI Framework Support | ||
| description: | ||
| Comprehensive guide to AI framework compatibility and support on the iExec | ||
| platform | ||
| --- | ||
|
|
||
| # 🤖 AI Framework Support | ||
|
|
||
| The iExec Platform provides comprehensive support for popular AI and machine | ||
| learning frameworks. Deploy confidential AI with ease. iExec supports popular | ||
| AI/ML frameworks, running in secure Trusted Execution Environments (TEEs) with | ||
|
Check notice on line 12 in src/protocol/ai.md
|
||
| optimized configurations. | ||
|
|
||
| ## 🚀 Quick Start | ||
|
|
||
| **Want to get started immediately?** | ||
|
|
||
| - 📚 | ||
| **[AI Frameworks Hello World](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world)** - | ||
| Ready-to-use Docker examples for TensorFlow, PyTorch, and more | ||
| - 🛠️ **[Build & Deploy](/guides/build-iapp/build-&-deploy)** - General iApp | ||
| development guide (not AI-specific) | ||
|
Check notice on line 23 in src/protocol/ai.md
|
||
| - 🔬 | ||
| **[TDX App Guide](/guides/build-iapp/advanced/create-your-first-tdx-app)** - | ||
| Build TDX applications (works well for AI workloads) | ||
|
Check notice on line 26 in src/protocol/ai.md
|
||
|
|
||
| ## 🛡️ Why iExec for AI? | ||
|
|
||
| ### Confidential Computing | ||
|
Check warning on line 30 in src/protocol/ai.md
|
||
|
|
||
| Trusted Execution Environments (TEEs) protect your AI models and data | ||
|
Check notice on line 32 in src/protocol/ai.md
|
||
| end-to-end: | ||
|
|
||
| - **Data Privacy**: TEEs isolate AI computations in secure enclaves | ||
| - **Secure Training & Inference**: Unauthorized entities can never access your | ||
| models and data | ||
| - **Hardware-Level Security**: Intel SGX and TDX provide enterprise-grade | ||
|
Check failure on line 38 in src/protocol/ai.md
|
||
| protection | ||
|
|
||
| ### AI Monetization | ||
|
Check warning on line 41 in src/protocol/ai.md
|
||
|
|
||
| Monetize your AI assets easily and securely: | ||
|
|
||
| - **Datasets**: Encrypt and sell access to your training data | ||
| - **Models**: Deploy and monetize your trained AI models | ||
| - **Agents**: Create and sell AI agents and applications | ||
| - **Ownership Preserved**: Your digital assets always remain yours | ||
|
|
||
| ### Decentralized Infrastructure | ||
|
|
||
| Scale AI applications without centralized cloud dependencies: | ||
|
|
||
| - **On-Demand Compute**: Access powerful resources when you need them | ||
| - **Fair Pricing**: Blockchain verifies execution costs transparently | ||
|
Check failure on line 55 in src/protocol/ai.md
|
||
| - **Global Network**: Deploy across a worldwide network of secure workers | ||
|
|
||
| ## 🤖 AI Framework Support | ||
|
|
||
| ### Overview | ||
|
|
||
| | Framework | TDX Support | SGX Support | Best For | | ||
|
Check notice on line 62 in src/protocol/ai.md
|
||
| | ---------------- | --------------- | --------------- | ----------------------------- | | ||
| | **TensorFlow** | ✅ Yes (3.01GB) | ❌ No | Deep learning, production ML | | ||
|
Check notice on line 64 in src/protocol/ai.md
|
||
| | **PyTorch** | ✅ Yes (6.44GB) | ❌ No | Research, computer vision | | ||
|
Check notice on line 65 in src/protocol/ai.md
|
||
| | **Scikit-learn** | ✅ Yes (1.18GB) | ✅ Yes (1.01GB) | Traditional ML, data analysis | | ||
|
Check notice on line 66 in src/protocol/ai.md
|
||
| | **OpenVINO** | ✅ Yes (1.82GB) | ❌ No | Computer vision, inference | | ||
|
Check notice on line 67 in src/protocol/ai.md
|
||
| | **NumPy** | ✅ Yes (1.25GB) | ✅ Yes (1.08GB) | Scientific computing | | ||
|
Check notice on line 68 in src/protocol/ai.md
|
||
| | **Matplotlib** | ✅ Yes (1.25GB) | ✅ Yes (1.08GB) | Data visualization | | ||
|
Check failure on line 69 in src/protocol/ai.md
|
||
|
|
||
| ### Framework Details | ||
|
Check warning on line 71 in src/protocol/ai.md
|
||
|
|
||
| | Framework | Version | Description | TDX Support | SGX Support | Use Cases | Resources | | ||
|
Check notice on line 73 in src/protocol/ai.md
|
||
| | ---------------- | ----------- | --------------------------------------------- | ----------- | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | **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) | | ||
|
Check failure on line 75 in src/protocol/ai.md
|
||
| | **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) | | ||
|
Check failure on line 76 in src/protocol/ai.md
|
||
| | **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) | | ||
|
Check failure on line 77 in src/protocol/ai.md
|
||
| | **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) | | ||
|
Check failure on line 78 in src/protocol/ai.md
|
||
| | **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) | | ||
|
Check failure on line 79 in src/protocol/ai.md
|
||
| | **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) | | ||
|
Check failure on line 80 in src/protocol/ai.md
|
||
|
|
||
| ## 🐳 Getting Started with Docker Examples | ||
|
|
||
| ### What's Included | ||
|
|
||
| Our | ||
|
Check warning on line 86 in src/protocol/ai.md
|
||
| [AI Frameworks Hello World repository](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world) | ||
| includes ready-to-use examples: | ||
|
|
||
| ``` | ||
| ai-frameworks-hello-world/ | ||
| ├── tensorflow/ # TensorFlow 2.19.0 example | ||
| ├── pytorch/ # PyTorch 2.7.0+cu126 example | ||
| ├── scikit/ # Scikit-learn 1.6.1 example | ||
| ├── openvino/ # OpenVINO 2024.6.0 example | ||
| ├── numpy/ # NumPy 2.0.2 example | ||
| └── matplotlib/ # Matplotlib 3.9.4 example | ||
| ``` | ||
|
|
||
| ### Quick Start Commands | ||
|
Check warning on line 100 in src/protocol/ai.md
|
||
|
|
||
| ```bash | ||
| # Clone the repository | ||
| git clone https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world.git | ||
| cd ai-frameworks-hello-world | ||
|
|
||
| # Try TensorFlow example | ||
| cd tensorflow | ||
| docker build -t hello-tensorflow . | ||
| docker run --rm hello-tensorflow | ||
|
|
||
| # Try PyTorch example | ||
| cd ../pytorch | ||
| docker build -t hello-pytorch . | ||
| docker run --rm hello-pytorch | ||
| ``` | ||
|
|
||
| ### Features | ||
|
|
||
| - **✅ Isolated Testing**: Each framework runs in its own container | ||
| - **✅ Reproducible**: Consistent environment across systems | ||
| - **✅ TDX Ready**: All containers tested for Intel TDX compatibility | ||
|
Check notice on line 122 in src/protocol/ai.md
|
||
| - **✅ Easy Deployment**: Simple build and run commands | ||
|
|
||
| ## 📊 Technology Comparison | ||
|
|
||
| ### TDX vs SGX for AI | ||
|
Check warning on line 127 in src/protocol/ai.md
|
||
|
|
||
| | Feature | Intel TDX | Intel SGX | | ||
|
Check failure on line 129 in src/protocol/ai.md
|
||
| | --------------------- | -------------------------- | ---------------------------------- | | ||
| | **Memory Limit** | Multi-GB+ | ~1.95GB | | ||
|
Check failure on line 131 in src/protocol/ai.md
|
||
| | **Framework Support** | All major frameworks | Limited (Scikit-learn, NumPy) | | ||
|
Check notice on line 132 in src/protocol/ai.md
|
||
| | **Code Changes** | Minimal ("lift and shift") | Significant modifications required | | ||
|
Check notice on line 133 in src/protocol/ai.md
|
||
| | **Production Ready** | ✅ Yes | ⚠️ Limited | | ||
| | **AI Workloads** | ✅ Excellent | ❌ Restricted | | ||
|
|
||
| ### Recommendations | ||
|
|
||
| #### For Production AI Applications | ||
|
Check warning on line 139 in src/protocol/ai.md
|
||
|
|
||
| - **Use TDX** for TensorFlow, PyTorch, and OpenVINO | ||
|
Check notice on line 141 in src/protocol/ai.md
|
||
| - **Use SGX** for lightweight ML with Scikit-learn and NumPy | ||
|
Check notice on line 142 in src/protocol/ai.md
|
||
|
|
||
| #### For Development and Testing | ||
|
Check warning on line 144 in src/protocol/ai.md
|
||
|
|
||
| - **Start with SGX** for simple ML tasks | ||
|
Check notice on line 146 in src/protocol/ai.md
|
||
| - **Migrate to TDX** for complex AI workloads | ||
|
Check notice on line 147 in src/protocol/ai.md
|
||
|
|
||
| #### Important Considerations | ||
|
Check warning on line 149 in src/protocol/ai.md
|
||
|
|
||
| - **SGX Limitations**: Expect potential library incompatibilities and code | ||
|
Check notice on line 151 in src/protocol/ai.md
|
||
| modifications | ||
| - **TDX Advantages**: Minimal code changes required ("lift and shift" approach) | ||
|
Check notice on line 153 in src/protocol/ai.md
|
||
|
|
||
| ## 📚 Next Steps | ||
|
|
||
| ### Learn TEE Technologies | ||
|
Check warning on line 157 in src/protocol/ai.md
|
||
aimen-djari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - **[Intel SGX Technology](/protocol/tee/intel-sgx)** - SGX limitations and | ||
|
Check failure on line 159 in src/protocol/ai.md
|
||
| capabilities | ||
| - **[Intel TDX Technology](/protocol/tee/intel-tdx)** - TDX advantages for AI | ||
|
Check failure on line 161 in src/protocol/ai.md
|
||
| - **[SGX vs TDX Comparison](/protocol/tee/sgx-vs-tdx)** - Detailed comparison | ||
|
Check notice on line 162 in src/protocol/ai.md
|
||
|
|
||
| ### Build AI Applications | ||
|
Check warning on line 164 in src/protocol/ai.md
|
||
|
|
||
| - **[Build & Test](/guides/build-iapp/build-&-test)** - Build and test your AI | ||
| application | ||
|
Check warning on line 167 in src/protocol/ai.md
|
||
| - **[Deploy & Run](/guides/build-iapp/deploy-&-run)** - Deploy and run your AI | ||
| application | ||
|
Check warning on line 169 in src/protocol/ai.md
|
||
| - **[Build Intel TDX App](/guides/build-iapp/advanced/build-your-first-tdx-iapp)** - | ||
|
Check failure on line 170 in src/protocol/ai.md
|
||
| TDX applications for AI workloads | ||
|
Check notice on line 171 in src/protocol/ai.md
|
||
| - **[Inputs and Outputs](/guides/build-iapp/inputs-and-outputs)** - Handle data | ||
| flow in TEE environment | ||
|
Check notice on line 173 in src/protocol/ai.md
|
||
|
|
||
| ### Explore Examples | ||
|
Check warning on line 175 in src/protocol/ai.md
|
||
|
|
||
| - **[AI Frameworks Hello World](https://github.com/iExecBlockchainComputing/ai-frameworks-hello-world)** - | ||
| Ready-to-use Docker examples | ||
| - **[iExec Discord](https://discord.com/invite/pbt9m98wnU)** - Community support | ||
Uh oh!
There was an error while loading. Please reload this page.