iExec: Using iExec and Tee Worker to Create Apps that Use Datasets Stored on Filebase
Learn how to use iExec and Tee Worker to create apps that use datasets stored on Filebase.
What is iExec?
1. Install the iExec SDK CLI package with the following command:
2. Create a new Wallet file:

3. Initialize your iExec project:

4. We will use the iExec testnet, called Viviani, for our project. Next, initialize the default remote storage:
5. Now initialize your app:
6. Then deploy this default app on the Viviani network:

7. Confirm it was deployed successfully by checking your list of deployed apps:

8. Now, to run your app you will need RLC tokens.

9. Confirm the transaction was successful by checking your wallet’s balance:

10. Now it's time to run your application. Use the following command:

11. Download the result of your task with the command:

12. View the contents of your task result file:

13. Up until now, we’ve been using the default storage configuration for iExec, which is IPFS managed by iExec.
14. For this tutorial, we’ll use a sample dataset that we’ll initiate with the command:

15. Now we’ll create a sample dataset with the command:
16. Then encrypt your dataset:
17. You can upload files to Filebase using two methods: the Filebase Web Console, or the Filebase S3-compatible API.
18. To use the web console, navigate to console.filebase.com.
19. Select ‘Buckets’ from the left sidebar menu, or navigate to console.filebase.com/buckets.

20. Enter a bucket name and choose the IPFS storage network to create the bucket.

21. Next, select the bucket from your list of buckets, then select ‘Upload’ in the top right corner to upload your files.

22. Select your files to be uploaded.

23. You can view the IPFS CID from the bucket object list in the CID column, or you can click on each uploaded object to display the metadata for the object to view the IPFS CID.

24. Next, open the iexec.json file, navigate to the dataset section, and edit the following lines:
iexec.json file, navigate to the dataset section, and edit the following lines:25. Deploy your dataset on the network with the command:

26. Now we need to push the encryption key to the Secret Management Service so that the deployed dataset can be used for authorized applications.
27. Now let’s deploy an application that uses this dataset.
28. In the src/ folder, open the new file called app.py and input the following code:
src/ folder, open the new file called app.py and input the following code:29. Then build the TEE docker image by editing the Dockerfile we created previously to reflect the following content:
30. Open the sconify.sh file and input the following code:
sconify.sh file and input the following code:31. Then run the sconify.sh script to build the TEE app:
sconify.sh script to build the TEE app:32. Now let’s deploy the TEE app on the iExec network. Start by initializing the application:
33. Get the enclave fingerprint for your TEE image:
34. Then edit the iexec.json file to add the following configuration details:
iexec.json file to add the following configuration details:35. Deploy the app on the iExec testnet:
36. Then run the TEE app:
Last updated