diff --git a/docs/colab/Jupyter.md b/docs/colab/Jupyter.md new file mode 100644 index 00000000..bb254caf --- /dev/null +++ b/docs/colab/Jupyter.md @@ -0,0 +1,95 @@ +--- +id: "jupyter" +title: "Jupyter Notebook" +slug: "/" +sidebar_position: 0 +--- + +## Log in + +1. Open the [Marketplace](https://marketplace.superprotocol.com). + +2. Click **Enter Marketplace** in the upper-right corner and log in using your preferred method. + +## Get SPPI tokens + +1. Click on your account name in the upper-right corner and select Account. + + +
+
+ +2. In the Account window, copy your Super Wallet address and share it with your contact in Super Protocol to receive SPPI tokens. + + +
+
+ +## Upload an IPYNB script or dataset + +1. Open the [Marketplace Colab page](https://marketplace.superprotocol.com/order-create-colab). + +2. Press **Upload Content**, select a file or folder, and click **Upload**. The uploaded content will be automatically encrypted and placed in a decentralized file storage (Storj). + +3. Save the resulting TII.JSON file; it can be opened in any text editor. Inside: + +- Encrypted data describing how to download and decrypt the uploaded content (objects `"encryptedResource"` and `"encryptedTRI"`). +- Hash of the uploaded content, calculated before the encryption. +- Restrictions on the computing device and the solution offer (i.e., Jupyter Notebook). + +TII.JSON files are safe to share. The information about the uploaded content is encrypted with the public key of the specified confidential virtual machine (`"offerId": "10"`). Only this machine can decrypt it and then download and decrypt the content itself. The machine runs inside a Trusted Execution Environment with no external access. + +## Deploy + +1. Open the [Marketplace Colab page](https://marketplace.superprotocol.com/order-create-colab). + +2. Press **Run Colab**. + +3. Add the application and dataset TII.JSON files generated during the upload process. + +4. Press **Run**. When the order is created, you will be redirected to the order page. Write down the order ID; you may need it later for verification. + +5. Wait until the order is complete. For small files, it typically takes around 20 minutes, but the time can be significantly longer for large files. Use the **Extend Lease** button to add tokens to the order balance if the lease time is running out. + +6. When the order is complete (Status: Done), press **Get Result** and download the TAR.GZ archive containing the order result. + +7. Unzip the downloaded archive. The execution result is located in the `output` folder. + +## Verify + +1. [Download and set up SPCTL](/cli/) – the Super Protocol CLI tool. + +2. Get the order report: + + +```shell +./spctl orders get-report --save-to report.json +``` + +Replace `` with your order ID, for example: + +```shell +./spctl orders get-report 244834 --save-to report.json +``` + +The command will display and save the order report to the `report.json` file in the SPCTL directory. This report includes the certificate chain, order metadata, and validation result. + +3. Ensure you see `Order report validation successful!` in the output. + +4. Open `report.json` in a text editor and find two entries in the `“runtimeInfo”` array that start with `"type": "Data"`. For example: + +```json +{ + "type": "Data", + "size": 12901, + "hash": { + "algo": "sha256", + "hash": "8598805cd2136a4beff17559a7228854f6a8cc0b027856ea5c196fb8d0602501", + "encoding": "hex" + } +}, +``` + +One such entry corresponds to the IPYNB script, the other to the dataset. + +The hashes in these entries were calculated inside the TEE before the execution. Open the TII.JSON files in a text editor and compare the hashes within them with the hashes in the report. The match means the IPYNB script and the dataset are genuine and have not been altered. \ No newline at end of file diff --git a/docs/colab/docker.md b/docs/colab/docker.md new file mode 100644 index 00000000..35497f48 --- /dev/null +++ b/docs/colab/docker.md @@ -0,0 +1,8 @@ +--- +id: "docker" +title: "Docker Image" +slug: "/docker" +sidebar_position: 1 +--- + +Work in progress... \ No newline at end of file diff --git a/docs/colab/images/1.png b/docs/colab/images/1.png new file mode 100644 index 00000000..61900f4a Binary files /dev/null and b/docs/colab/images/1.png differ diff --git a/docs/colab/images/2.png b/docs/colab/images/2.png new file mode 100644 index 00000000..13475784 Binary files /dev/null and b/docs/colab/images/2.png differ diff --git a/docs/marketplace/guides/log-in.md b/docs/marketplace/guides/log-in.md index f5dfa7d3..30bea717 100644 --- a/docs/marketplace/guides/log-in.md +++ b/docs/marketplace/guides/log-in.md @@ -25,7 +25,7 @@ Both are free, popular, and non-custodial. Choose either and install its browser :::important -Super Protocol is not affiliated with MetaMask or Trust Wallet in any way. +Super Protocol is not affiliated with MetaMask or Trust Wallet. ::: diff --git a/docusaurus.config.js b/docusaurus.config.js index 59988c06..83b97690 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -66,6 +66,10 @@ const config = { from: "/data-for-ai", to: "/data-for-ai/overview/about", }, + /*{ + from: "/colab", + to: "/colab/jupyter", + },*/ ], }, ], @@ -91,6 +95,16 @@ const config = { rehypePlugins: [katex], }, ], + [ + "@docusaurus/plugin-content-docs", + { + id: "colab", + path: "./docs/colab", + routeBasePath: "/colab", + remarkPlugins: [math], + rehypePlugins: [katex], + }, + ], ], presets: [ [