From 131d64cf0f48974be24fa51db238485645728e07 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Thu, 9 May 2024 14:18:36 +0530 Subject: [PATCH 01/19] Add notebook documentation for deploying PySyft on a local k8s cluster --- .../deploy/01-kubernetes-quickstart.ipynb | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb diff --git a/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb b/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb new file mode 100644 index 00000000000..5d87d5d2a87 --- /dev/null +++ b/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb @@ -0,0 +1,108 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Quick Start Guide: Deploying PySyft on a Local Kubernetes Cluster" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "## Introduction\n", + "Welcome to our quick start guide for deploying PySyft on a local Kubernetes cluster! PySyft is a powerful framework for privacy-preserving machine learning, and deploying it on Kubernetes allows an easy way to quickly try out the full PySyft stack on your own system. This guide will walk you through the process step by step." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "## Prerequisites\n", + "Before we begin, ensure you have the following prerequisites installed on your system:\n", + "1. [Docker](https://docs.docker.com/install/): Docker is required to create and manage containers.\n", + "2. [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl): kubectl is the command-line tool for interacting with Kubernetes clusters.\n", + "3. [k3d](https://k3d.io/v5.6.3/#installation): k3d is used to create local Kubernetes clusters.\n", + "4. [Helm](https://helm.sh/docs/intro/install/): Helm is the package manager for Kubernetes, used to install and manage applications on Kubernetes clusters." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Deployment Steps\n", + "\n", + "### 1. Create a Local Kubernetes Cluster\n", + "First, create a local Kubernetes cluster named \"syft\" using k3d:\n", + "```sh\n", + "k3d cluster create syft\n", + "```\n", + "\n", + "### 2. Add and Update Helm Repo for Syft\n", + "Add the Helm repository for PySyft and update it:\n", + "```sh\n", + "helm repo add openmined https://openmined.github.io/PySyft/helm\n", + "helm repo update openmined\n", + "```\n", + "\n", + "### 3. Search for Available Syft Versions\n", + "Explore available versions of PySyft using Helm:\n", + "```sh\n", + "helm search repo openmined/syft --versions --devel\n", + "```\n", + "\n", + "### 4. Set Your Preferred Syft Chart Version\n", + "Set the version of PySyft you want to install:\n", + "```sh\n", + "SYFT_VERSION=\"\"\n", + "```\n", + "\n", + "### 5. Provision Helm Charts\n", + "Install PySyft on the Kubernetes cluster with your preferred version:\n", + "```sh\n", + "helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className=\"traefik\"\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Next Steps\n", + "Congratulations! You have successfully deployed PySyft on your local Kubernetes cluster. Now, you can explore its capabilities and use cases through our API example notebooks:\n", + "\n", + "πŸ“ [API Example Notebooks](../../api)\n", + "- [00-load-data.ipynb](../../api/0.8/00-load-data.ipynb)\n", + "- [01-submit-code.ipynb](../../api/0.8/01-submit-code.ipynb)\n", + "- [02-review-code-and-approve.ipynb](../../api/0.8/02-review-code-and-approve.ipynb)\n", + "- [03-data-scientist-download-result.ipynb](../../api/0.8/03-data-scientist-download-result.ipynb)\n", + "- [04-jax-example.ipynb](../../api/0.8/04-jax-example.ipynb)\n", + "- [05-custom-policy.ipynb](../../api/0.8/05-custom-policy.ipynb)\n", + "- [06-multiple-code-requests.ipynb](../../api/0.8/06-multiple-code-requests.ipynb)\n", + "- [07-domain-register-control-flow.ipynb](../../api/0.8/07-domain-register-control-flow.ipynb)\n", + "- [08-code-version.ipynb](../../api/0.8/08-code-version.ipynb)\n", + "- [09-blob-storage.ipynb](../../api/0.8/09-blob-storage.ipynb)\n", + "- [10-container-images.ipynb](../../api/0.8/10-container-images.ipynb)\n", + "- [11-container-images-k8s.ipynb](../../api/0.8/11-container-images-k8s.ipynb)\n", + "\n", + "Feel free to explore these notebooks to get started with PySyft and unlock its full potential for privacy-preserving machine learning!" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 5a895d0b3632a73ee82e236a034b717cd9fcd066 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Thu, 9 May 2024 16:05:09 +0530 Subject: [PATCH 02/19] Add port forward for k3d cluster --- notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb b/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb index 5d87d5d2a87..83b4a41ddbd 100644 --- a/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb +++ b/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb @@ -44,7 +44,7 @@ "### 1. Create a Local Kubernetes Cluster\n", "First, create a local Kubernetes cluster named \"syft\" using k3d:\n", "```sh\n", - "k3d cluster create syft\n", + "k3d cluster create syft -p \"8080:80@loadbalancer\"\n", "```\n", "\n", "### 2. Add and Update Helm Repo for Syft\n", @@ -69,7 +69,7 @@ "### 5. Provision Helm Charts\n", "Install PySyft on the Kubernetes cluster with your preferred version:\n", "```sh\n", - "helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className=\"traefik\"\n", + "helm install my-syft openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className=\"traefik\"\n", "```" ] }, From 1d081642cddfebf6cee6aa2313653d165f659ae7 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Fri, 10 May 2024 02:19:47 +0530 Subject: [PATCH 03/19] Add placeholder notebooks and info about different deployment types --- .../deploy/00-deployment-types.ipynb | 99 +++++++++++++++++++ .../tutorials/deploy/01-deploy-python.ipynb | 18 ++++ .../deploy/02-deploy-container.ipynb | 18 ++++ ...ickstart.ipynb => 03-deploy-k8s-k3d.ipynb} | 2 +- .../deploy/04-deploy-k8s-azure.ipynb | 18 ++++ .../tutorials/deploy/05-deploy-k8s-gcp.ipynb | 18 ++++ .../tutorials/deploy/06-deploy-k8s-aws.ipynb | 18 ++++ .../tutorials/deploy/07-deploy-devspace.ipynb | 18 ++++ 8 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 notebooks/tutorials/deploy/00-deployment-types.ipynb create mode 100644 notebooks/tutorials/deploy/01-deploy-python.ipynb create mode 100644 notebooks/tutorials/deploy/02-deploy-container.ipynb rename notebooks/tutorials/deploy/{01-kubernetes-quickstart.ipynb => 03-deploy-k8s-k3d.ipynb} (98%) create mode 100644 notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb create mode 100644 notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb create mode 100644 notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb create mode 100644 notebooks/tutorials/deploy/07-deploy-devspace.ipynb diff --git a/notebooks/tutorials/deploy/00-deployment-types.ipynb b/notebooks/tutorials/deploy/00-deployment-types.ipynb new file mode 100644 index 00000000000..b9283a0c94c --- /dev/null +++ b/notebooks/tutorials/deploy/00-deployment-types.ipynb @@ -0,0 +1,99 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Introduction to PySyft Deployment Options\n", + "\n", + "PySyft offers various deployment options catering to different needs and environments. Each deployment option provides a unique set of advantages, allowing users to seamlessly integrate PySyft into their workflows, whether for local development, production deployment, or experimentation in cloud environments. Below, we explore the different deployment options supported by PySyft and provide insights into when each option is most suitable." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 1. Local Python Deployment\n", + "\n", + "This deployment option runs PySyft locally within a Python environment. It is lightweight and runs everything in-memory, making it ideal for quick prototyping and testing.\n", + "\n", + "**Recommended For:** \n", + "- Development and testing on resource-constrained systems without Docker support.\n", + "- Rapid experimentation with PySyft APIs.\n", + "\n", + "Follow [01-deploy-python.ipynb](./01-deploy-python.ipynb) for deployment instructions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2. Single Container Deployment\n", + "\n", + "In this deployment, PySyft is encapsulated within a single Docker container, providing better isolation and portability compared to the local Python deployment.\n", + "\n", + "**Recommended For:**\n", + "- Resource-constrained systems with Docker support.\n", + "- Standardizing PySyft deployment across different environments.\n", + "\n", + "Follow [02-deploy-container.ipynb](./02-deploy-container.ipynb) for deployment instructions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 3. Kubernetes Deployment\n", + "\n", + "This deployment option orchestrates the entire PySyft stack on a Kubernetes cluster, enabling scalable and efficient deployment in cloud or on-premises environments. Various Kubernetes configurations are available for deployment flexibility.\n", + "\n", + "**Recommended For:**\n", + "- Production-grade deployments requiring scalability and fault tolerance.\n", + "- Cloud-native environments where Kubernetes is the preferred orchestration tool.\n", + "\n", + " **[a. Local k3d Cluster Deployment](./03-deploy-k8s-k3d.ipynb)**\n", + " - Quick setup for local development and testing using a lightweight Kubernetes cluster.\n", + "\n", + " **[b. Azure Deployment](./04-deploy-k8s-azure.ipynb)**\n", + " - Deployment on Microsoft Azure cloud infrastructure for scalable and reliable operation.\n", + "\n", + " **[c. GCP Deployment](./05-deploy-k8s-gcp.ipynb)**\n", + " - Deployment on Google Cloud Platform for seamless integration with GCP services.\n", + "\n", + " **[d. AWS Deployment](./06-deploy-k8s-aws.ipynb)**\n", + " - Deployment on Amazon Web Services for robust and flexible cloud-based deployment." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 4. Devspace Deployment\n", + "\n", + "This deployment option utilizes Devspace to streamline the development process for PySyft. It provides features such as local image building, port-forwarding, volume mounting, hot-reloading, and debugging to enhance the development experience.\n", + "\n", + "**Recommended For:**\n", + "- Developers contributing to PySyft codebase.\n", + "- Simplifying local development setup and debugging processes.\n", + "\n", + "Follow [07-deploy-devspace.ipynb](./07-deploy-devspace.ipynb) for deployment instructions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Choosing the Right Deployment Option\n", + "\n", + "Selecting the appropriate deployment option depends on factors such as development objectives, resource constraints, scalability requirements, and familiarity with the deployment environment. For quick experimentation and local development, the local Python deployment or single container deployment may suffice. However, for production-grade deployments requiring scalability and reliability, Kubernetes deployment is recommended. Developers actively contributing to PySyft can benefit from the Devspace deployment option for a streamlined development experience." + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/01-deploy-python.ipynb b/notebooks/tutorials/deploy/01-deploy-python.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/01-deploy-python.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/02-deploy-container.ipynb b/notebooks/tutorials/deploy/02-deploy-container.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/02-deploy-container.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb similarity index 98% rename from notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb rename to notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb index 83b4a41ddbd..d1ee9ff67f9 100644 --- a/notebooks/tutorials/deploy/01-kubernetes-quickstart.ipynb +++ b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Quick Start Guide: Deploying PySyft on a Local Kubernetes Cluster" + "# Deploying PySyft on a Local Kubernetes Cluster" ] }, { diff --git a/notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb b/notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb b/notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb b/notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/tutorials/deploy/07-deploy-devspace.ipynb b/notebooks/tutorials/deploy/07-deploy-devspace.ipynb new file mode 100644 index 00000000000..71c158afddd --- /dev/null +++ b/notebooks/tutorials/deploy/07-deploy-devspace.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "TODO" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From f8d3071fca226e0351e794aa2dc71ec26c2466e9 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Sun, 12 May 2024 22:54:35 +0530 Subject: [PATCH 04/19] Add loc`al in-memory python deployment tutorial --- .../tutorials/deploy/01-deploy-python.ipynb | 182 +++++++++++++++++- 1 file changed, 180 insertions(+), 2 deletions(-) diff --git a/notebooks/tutorials/deploy/01-deploy-python.ipynb b/notebooks/tutorials/deploy/01-deploy-python.ipynb index 71c158afddd..76dbc18f7c1 100644 --- a/notebooks/tutorials/deploy/01-deploy-python.ipynb +++ b/notebooks/tutorials/deploy/01-deploy-python.ipynb @@ -4,13 +4,191 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "TODO" + "# Local in-memory python deployment" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Introduction\n", + "\n", + "One of the quickest way to try out PySyft is to install the pre-built python package on your local environment using pip. The python package is lightweight and runs the PySyft stack in-memory.\n", + "\n", + "**Recommended For:**\n", + "- Development and testing on resource-constrained systems without Docker support.\n", + "- Rapid experimentation with PySyft APIs." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Prerequisites\n", + "Before we begin, ensure you have the following prerequisites installed on your system:\n", + "1. Python 3.10 - 3.12\n", + "2. pip (or uv)\n", + "3. venv (optional, but recommended)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Deployment Steps" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Installing Syft\n", + "1. Create and activate a python virtual environment (Optional, but recommended)\n", + " ```bash\n", + " python -m venv venv/\n", + " source venv/bin/activate\n", + " ```\n", + "\n", + "2. Install PySyft\n", + " ```bash\n", + " pip install syft\n", + " ```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Working with Python Domain\n", + "\n", + "`PySyft` makes it very easy to develop against a domain in a notebook by providing an interface (`sy.orchestra`) that allows you to start a domain with a webserver in a notebook in the background, which is a lightweight version of a Domain that would be used in production. You can specify options such as what kind of database you are using, whether you want to use networking and how many processes you want to use. You can launch a Domain by simply executing:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# syft absolute\n", + "import syft as sy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "node = sy.orchestra.launch(\n", + " name=\"dev-mode-example-domain-1\", port=8020, reset=True, dev_mode=True\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we don't need a webserver (for development this is true in many cases), we can omit the port and instead use\n", + "\n", + "```python\n", + "node = sy.orchestra.launch(name=\"dev-mode-example-domain-1\", dev_mode=True, reset=True)\n", + "```\n", + "\n", + "One of the benefits of not using a port is that you can use a debugger and set breakpoints within api calls. This makes debugging way faster in many cases." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we are ready to start using the domain. The domain comes with standard login credentials for the admin (just for development)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Once you are logged in, you are ready to start using the domain, for instance for creating a dataset (this one is empty, just as a example)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", + "client.upload_dataset(dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Lastly to stop or terminate your Domain, we can execute the following command:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "node.land()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Next Steps\n", + "Congratulations! You have successfully deployed a local in-memory PySyft stack using python. Now, you can explore its capabilities and use cases through our API example notebooks:\n", + "\n", + "πŸ“ [API Example Notebooks](../../api)\n", + "- [00-load-data.ipynb](../../api/0.8/00-load-data.ipynb)\n", + "- [01-submit-code.ipynb](../../api/0.8/01-submit-code.ipynb)\n", + "- [02-review-code-and-approve.ipynb](../../api/0.8/02-review-code-and-approve.ipynb)\n", + "- [03-data-scientist-download-result.ipynb](../../api/0.8/03-data-scientist-download-result.ipynb)\n", + "- [04-jax-example.ipynb](../../api/0.8/04-jax-example.ipynb)\n", + "- [05-custom-policy.ipynb](../../api/0.8/05-custom-policy.ipynb)\n", + "- [06-multiple-code-requests.ipynb](../../api/0.8/06-multiple-code-requests.ipynb)\n", + "- [07-domain-register-control-flow.ipynb](../../api/0.8/07-domain-register-control-flow.ipynb)\n", + "- [08-code-version.ipynb](../../api/0.8/08-code-version.ipynb)\n", + "- [09-blob-storage.ipynb](../../api/0.8/09-blob-storage.ipynb)\n", + "- [10-container-images.ipynb](../../api/0.8/10-container-images.ipynb)\n", + "- [11-container-images-k8s.ipynb](../../api/0.8/11-container-images-k8s.ipynb)\n", + "\n", + "Feel free to explore these notebooks to get started with PySyft and unlock its full potential for privacy-preserving machine learning!" ] } ], "metadata": { + "kernelspec": { + "display_name": "PySyft", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.7" } }, "nbformat": 4, From 05db9a68b0f8b3e137c59a9c0218a16124bca334 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Sun, 12 May 2024 23:32:31 +0530 Subject: [PATCH 05/19] Add instructions to connect to local k8s cluster --- .../tutorials/deploy/01-deploy-python.ipynb | 15 ++-- .../tutorials/deploy/03-deploy-k8s-k3d.ipynb | 87 ++++++++++++++++++- 2 files changed, 91 insertions(+), 11 deletions(-) diff --git a/notebooks/tutorials/deploy/01-deploy-python.ipynb b/notebooks/tutorials/deploy/01-deploy-python.ipynb index 76dbc18f7c1..b0de2c53fa3 100644 --- a/notebooks/tutorials/deploy/01-deploy-python.ipynb +++ b/notebooks/tutorials/deploy/01-deploy-python.ipynb @@ -26,7 +26,7 @@ "source": [ "## Prerequisites\n", "Before we begin, ensure you have the following prerequisites installed on your system:\n", - "1. Python 3.10 - 3.12\n", + "1. Python (3.10 - 3.12)\n", "2. pip (or uv)\n", "3. venv (optional, but recommended)" ] @@ -61,7 +61,7 @@ "source": [ "## Working with Python Domain\n", "\n", - "`PySyft` makes it very easy to develop against a domain in a notebook by providing an interface (`sy.orchestra`) that allows you to start a domain with a webserver in a notebook in the background, which is a lightweight version of a Domain that would be used in production. You can specify options such as what kind of database you are using, whether you want to use networking and how many processes you want to use. You can launch a Domain by simply executing:" + "`PySyft` makes it very easy to develop against a domain in a notebook by providing the `sy.orchestra` interface. It allows you to start a domain with a webserver in a notebook in the background, which is a lightweight version of a Domain that would be used in production. You can specify options such as what kind of database you are using, whether you want to use networking and how many processes you want to use. You can launch a Domain by simply executing:" ] }, { @@ -95,14 +95,9 @@ "node = sy.orchestra.launch(name=\"dev-mode-example-domain-1\", dev_mode=True, reset=True)\n", "```\n", "\n", - "One of the benefits of not using a port is that you can use a debugger and set breakpoints within api calls. This makes debugging way faster in many cases." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, we are ready to start using the domain. The domain comes with standard login credentials for the admin (just for development)" + "One of the benefits of not using a port is that you can use a debugger and set breakpoints within api calls. This makes debugging way faster in many cases.\n", + "\n", + "Now, we are ready to start using the domain. The domain comes with test login credentials for the admin." ] }, { diff --git a/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb index d1ee9ff67f9..7453f6ee28d 100644 --- a/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb +++ b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb @@ -73,6 +73,77 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "## Working with the local Kubernetes deployment\n", + "\n", + "PySyft makes it very simple to connect to your existing Syft cluster by providing the `sy.orchestra` interface. You can connect to the domain by executing these steps in your jupyter notebook:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# syft absolute\n", + "import syft as sy\n", + "\n", + "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This will return a node handle by connecting to `http://localhost:8080` which is the default host and port where your kubernetes cluster will be running. You can connect to a different host and port by setting the environment variables `NODE_URL` and `NODE_PORT`.\n", + "```python\n", + "import os\n", + "\n", + "os.environ[\"NODE_URL\"] = \"\"\n", + "os.environ[\"NODE_PORT\"] = \"\"\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we are ready to start using the domain. The domain comes with default login credentials for the admin." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Once you are logged in, you are ready to start using the domain, for instance for creating a dataset (this one is empty, just as a example)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", + "client.upload_dataset(dataset)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -99,8 +170,22 @@ } ], "metadata": { + "kernelspec": { + "display_name": "PySyft", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.7" } }, "nbformat": 4, From 06b05e09d262b5eec4dab284b57290959f2bc2be Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Mon, 13 May 2024 22:41:30 +0530 Subject: [PATCH 06/19] Add single container deployment tutorial --- .../deploy/02-deploy-container.ipynb | 130 +++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/notebooks/tutorials/deploy/02-deploy-container.ipynb b/notebooks/tutorials/deploy/02-deploy-container.ipynb index 71c158afddd..b45fbeaee20 100644 --- a/notebooks/tutorials/deploy/02-deploy-container.ipynb +++ b/notebooks/tutorials/deploy/02-deploy-container.ipynb @@ -4,7 +4,135 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "TODO" + "# Single container deployment" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "## Introduction\n", + "\n", + "In this deployment, PySyft is encapsulated within a single Docker container, providing better isolation and portability compared to the local Python deployment.\n", + "\n", + "**Recommended For:**\n", + "- Resource-constrained systems with Docker support.\n", + "- Standardizing PySyft deployment across different environments." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Prerequisites\n", + "Before we begin, ensure you have [Docker](https://docs.docker.com/install/) installed on your system." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Deployment steps\n", + "\n", + "You can execute the below one-liner in your terminal to run the PySyft stack within a single docker container on port `8080`.\n", + "``` bash\n", + "docker run -it -e DEFAULT_ROOT_PASSWORD=secret -e PORT=8080 -p 8080:8080 openmined/grid-enclave:latest\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Working with the single container deployment\n", + "\n", + "PySyft makes it very simple to connect to any existing Syft cluster by providing the `sy.orchestra` interface. You can connect to the domain by executing these steps in your jupyter notebook:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# syft absolute\n", + "import syft as sy\n", + "\n", + "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This will return a node handle by connecting to `http://localhost:8080` which is the default host and port where your kubernetes cluster will be running. You can connect to a different host and port by setting the environment variables `NODE_URL` and `NODE_PORT`.\n", + "```python\n", + "import os\n", + "\n", + "os.environ[\"NODE_URL\"] = \"\"\n", + "os.environ[\"NODE_PORT\"] = \"\"\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we are ready to start using the domain. The domain comes with default login credentials for the admin." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Once you are logged in, you are ready to start using the domain, for instance for creating a dataset (this one is empty, just as a example)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", + "client.upload_dataset(dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Next Steps\n", + "Congratulations! You have successfully deployed PySyft on your local Kubernetes cluster. Now, you can explore its capabilities and use cases through our API example notebooks:\n", + "\n", + "πŸ“ [API Example Notebooks](../../api)\n", + "- [00-load-data.ipynb](../../api/0.8/00-load-data.ipynb)\n", + "- [01-submit-code.ipynb](../../api/0.8/01-submit-code.ipynb)\n", + "- [02-review-code-and-approve.ipynb](../../api/0.8/02-review-code-and-approve.ipynb)\n", + "- [03-data-scientist-download-result.ipynb](../../api/0.8/03-data-scientist-download-result.ipynb)\n", + "- [04-jax-example.ipynb](../../api/0.8/04-jax-example.ipynb)\n", + "- [05-custom-policy.ipynb](../../api/0.8/05-custom-policy.ipynb)\n", + "- [06-multiple-code-requests.ipynb](../../api/0.8/06-multiple-code-requests.ipynb)\n", + "- [07-domain-register-control-flow.ipynb](../../api/0.8/07-domain-register-control-flow.ipynb)\n", + "- [08-code-version.ipynb](../../api/0.8/08-code-version.ipynb)\n", + "- [09-blob-storage.ipynb](../../api/0.8/09-blob-storage.ipynb)\n", + "- [10-container-images.ipynb](../../api/0.8/10-container-images.ipynb)\n", + "- [11-container-images-k8s.ipynb](../../api/0.8/11-container-images-k8s.ipynb)\n", + "\n", + "Feel free to explore these notebooks to get started with PySyft and unlock its full potential for privacy-preserving machine learning!" ] } ], From 35a62e9a0aa21be374d45f2e8e409df806a63553 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Mon, 13 May 2024 23:10:22 +0530 Subject: [PATCH 07/19] Fix docker command in single container deployment tutorial --- .../tutorials/deploy/02-deploy-container.ipynb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/notebooks/tutorials/deploy/02-deploy-container.ipynb b/notebooks/tutorials/deploy/02-deploy-container.ipynb index b45fbeaee20..962d5326721 100644 --- a/notebooks/tutorials/deploy/02-deploy-container.ipynb +++ b/notebooks/tutorials/deploy/02-deploy-container.ipynb @@ -38,9 +38,23 @@ "source": [ "## Deployment steps\n", "\n", - "You can execute the below one-liner in your terminal to run the PySyft stack within a single docker container on port `8080`.\n", + "You can execute the below command in your terminal to run the PySyft stack within a single docker container on port `8080`." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "``` bash\n", - "docker run -it -e DEFAULT_ROOT_PASSWORD=secret -e PORT=8080 -p 8080:8080 openmined/grid-enclave:latest\n", + "docker run -it \\\n", + " -e NODE_NAME=syft-example-domain-1 \\\n", + " -e NODE_TYPE=domain \\\n", + " -e N_CONSUMERS=1 \\\n", + " -e SINGLE_CONTAINER_MODE=true \\\n", + " -e CREATE_PRODUCER=true \\\n", + " -e INMEMORY_WORKERS=true \\\n", + " -p 8080:80 --add-host=host.docker.internal:host-gateway \\\n", + " --name syft-example-domain-1 openmined/grid-backend:0.8.7-beta.7\n", "```" ] }, From 21bd6b84b9afe0570787206d42e801da9a162844 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 14:33:19 +0530 Subject: [PATCH 08/19] modify deployments cells to markdown --- .../deploy/02-deploy-container.ipynb | 39 ++++++++++++------- .../tutorials/deploy/03-deploy-k8s-k3d.ipynb | 24 ++++++------ 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/notebooks/tutorials/deploy/02-deploy-container.ipynb b/notebooks/tutorials/deploy/02-deploy-container.ipynb index 962d5326721..be1c530ab2b 100644 --- a/notebooks/tutorials/deploy/02-deploy-container.ipynb +++ b/notebooks/tutorials/deploy/02-deploy-container.ipynb @@ -41,6 +41,17 @@ "You can execute the below command in your terminal to run the PySyft stack within a single docker container on port `8080`." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Set Your Preferred Syft Version\n", + "\n", + "```sh\n", + "SYFT_VERSION=\"\"\n", + "```" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -54,7 +65,7 @@ " -e CREATE_PRODUCER=true \\\n", " -e INMEMORY_WORKERS=true \\\n", " -p 8080:80 --add-host=host.docker.internal:host-gateway \\\n", - " --name syft-example-domain-1 openmined/grid-backend:0.8.7-beta.7\n", + " --name syft-example-domain-1 openmined/grid-backend:$SYFT_VERSION\n", "```" ] }, @@ -68,22 +79,22 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ + "```python3\n", "# syft absolute\n", "import syft as sy\n", "\n", - "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")" + "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")\n", + "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This will return a node handle by connecting to `http://localhost:8080` which is the default host and port where your kubernetes cluster will be running. You can connect to a different host and port by setting the environment variables `NODE_URL` and `NODE_PORT`.\n", + "This will return a node handle by connecting to `http://localhost:8080` which is the default host and port where your docker container will be running. You can connect to a different host and port by setting the environment variables `NODE_URL` and `NODE_PORT`.\n", "```python\n", "import os\n", "\n", @@ -100,12 +111,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" + "```python3\n", + "client = node.login(email=\"info@openmined.org\", password=\"changethis\")\n", + "```" ] }, { @@ -116,13 +127,13 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ + "```python3\n", "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", - "client.upload_dataset(dataset)" + "client.upload_dataset(dataset)\n", + "```" ] }, { diff --git a/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb index 7453f6ee28d..c9cb2e1ebd8 100644 --- a/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb +++ b/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb @@ -87,15 +87,15 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ + "```python3\n", "# syft absolute\n", "import syft as sy\n", "\n", - "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")" + "node = sy.orchestra.launch(name=\"syft-example-domain-1\", deploy_to=\"remote\")\n", + "```" ] }, { @@ -119,12 +119,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" + "```python3\n", + "client = node.login(email=\"info@openmined.org\", password=\"changethis\")\n", + "```" ] }, { @@ -135,13 +135,13 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ + "```python3\n", "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", - "client.upload_dataset(dataset)" + "client.upload_dataset(dataset)\n", + "```" ] }, { From aaf8a800a63cd8b9ce3e314bc1041847fc39ef4d Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 14:45:58 +0530 Subject: [PATCH 09/19] change folder name from deploy to deployments --- .../tutorials/{deploy => deployments}/00-deployment-types.ipynb | 0 .../tutorials/{deploy => deployments}/01-deploy-python.ipynb | 0 .../tutorials/{deploy => deployments}/02-deploy-container.ipynb | 0 .../tutorials/{deploy => deployments}/03-deploy-k8s-k3d.ipynb | 0 .../tutorials/{deploy => deployments}/04-deploy-k8s-azure.ipynb | 0 .../tutorials/{deploy => deployments}/05-deploy-k8s-gcp.ipynb | 0 .../tutorials/{deploy => deployments}/06-deploy-k8s-aws.ipynb | 0 .../tutorials/{deploy => deployments}/07-deploy-devspace.ipynb | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename notebooks/tutorials/{deploy => deployments}/00-deployment-types.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/01-deploy-python.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/02-deploy-container.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/03-deploy-k8s-k3d.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/04-deploy-k8s-azure.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/05-deploy-k8s-gcp.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/06-deploy-k8s-aws.ipynb (100%) rename notebooks/tutorials/{deploy => deployments}/07-deploy-devspace.ipynb (100%) diff --git a/notebooks/tutorials/deploy/00-deployment-types.ipynb b/notebooks/tutorials/deployments/00-deployment-types.ipynb similarity index 100% rename from notebooks/tutorials/deploy/00-deployment-types.ipynb rename to notebooks/tutorials/deployments/00-deployment-types.ipynb diff --git a/notebooks/tutorials/deploy/01-deploy-python.ipynb b/notebooks/tutorials/deployments/01-deploy-python.ipynb similarity index 100% rename from notebooks/tutorials/deploy/01-deploy-python.ipynb rename to notebooks/tutorials/deployments/01-deploy-python.ipynb diff --git a/notebooks/tutorials/deploy/02-deploy-container.ipynb b/notebooks/tutorials/deployments/02-deploy-container.ipynb similarity index 100% rename from notebooks/tutorials/deploy/02-deploy-container.ipynb rename to notebooks/tutorials/deployments/02-deploy-container.ipynb diff --git a/notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb b/notebooks/tutorials/deployments/03-deploy-k8s-k3d.ipynb similarity index 100% rename from notebooks/tutorials/deploy/03-deploy-k8s-k3d.ipynb rename to notebooks/tutorials/deployments/03-deploy-k8s-k3d.ipynb diff --git a/notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb b/notebooks/tutorials/deployments/04-deploy-k8s-azure.ipynb similarity index 100% rename from notebooks/tutorials/deploy/04-deploy-k8s-azure.ipynb rename to notebooks/tutorials/deployments/04-deploy-k8s-azure.ipynb diff --git a/notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb b/notebooks/tutorials/deployments/05-deploy-k8s-gcp.ipynb similarity index 100% rename from notebooks/tutorials/deploy/05-deploy-k8s-gcp.ipynb rename to notebooks/tutorials/deployments/05-deploy-k8s-gcp.ipynb diff --git a/notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb b/notebooks/tutorials/deployments/06-deploy-k8s-aws.ipynb similarity index 100% rename from notebooks/tutorials/deploy/06-deploy-k8s-aws.ipynb rename to notebooks/tutorials/deployments/06-deploy-k8s-aws.ipynb diff --git a/notebooks/tutorials/deploy/07-deploy-devspace.ipynb b/notebooks/tutorials/deployments/07-deploy-devspace.ipynb similarity index 100% rename from notebooks/tutorials/deploy/07-deploy-devspace.ipynb rename to notebooks/tutorials/deployments/07-deploy-devspace.ipynb From 9e472d10fdade976f34290c43d383e7050846364 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 14:46:24 +0530 Subject: [PATCH 10/19] delete old data-engineer folder --- .../01-setting-up-dev-mode.ipynb | 370 ----------------- .../data-engineer/02-deployment-types.ipynb | 378 ------------------ .../tutorials/data-engineer/03-hagrid.ipynb | 73 ---- .../data-engineer/04-deploy-container.ipynb | 107 ----- .../data-engineer/05-deploy-stack.ipynb | 81 ---- .../data-engineer/06-deploy-to-azure.ipynb | 114 ------ .../data-engineer/07-deploy-to-gcp.ipynb | 73 ---- .../data-engineer/08-deploy-to-aws.ipynb | 152 ------- .../data-engineer/09-deploying-enclave.ipynb | 41 -- .../data-engineer/10-custom-deployment.ipynb | 97 ----- ...11-installing-and-upgrading-via-helm.ipynb | 364 ----------------- 11 files changed, 1850 deletions(-) delete mode 100644 notebooks/tutorials/data-engineer/01-setting-up-dev-mode.ipynb delete mode 100644 notebooks/tutorials/data-engineer/02-deployment-types.ipynb delete mode 100644 notebooks/tutorials/data-engineer/03-hagrid.ipynb delete mode 100644 notebooks/tutorials/data-engineer/04-deploy-container.ipynb delete mode 100644 notebooks/tutorials/data-engineer/05-deploy-stack.ipynb delete mode 100644 notebooks/tutorials/data-engineer/06-deploy-to-azure.ipynb delete mode 100644 notebooks/tutorials/data-engineer/07-deploy-to-gcp.ipynb delete mode 100644 notebooks/tutorials/data-engineer/08-deploy-to-aws.ipynb delete mode 100644 notebooks/tutorials/data-engineer/09-deploying-enclave.ipynb delete mode 100644 notebooks/tutorials/data-engineer/10-custom-deployment.ipynb delete mode 100644 notebooks/tutorials/data-engineer/11-installing-and-upgrading-via-helm.ipynb diff --git a/notebooks/tutorials/data-engineer/01-setting-up-dev-mode.ipynb b/notebooks/tutorials/data-engineer/01-setting-up-dev-mode.ipynb deleted file mode 100644 index ed84817235f..00000000000 --- a/notebooks/tutorials/data-engineer/01-setting-up-dev-mode.ipynb +++ /dev/null @@ -1,370 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Setting up Dev Mode" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "If you would like to work on the PySyft codebase, you can set up PySyft in dev mode. You will need to clone the repository, install syft locally and run the code you installed" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## Cloning the Repo" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "First, we start by cloning the repo" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "If you have an SSH key enabled in your github account, use" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "`git clone git@github.com:OpenMined/PySyft.git`" - ] - }, - { - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "Otherwise use" - ] - }, - { - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "`git clone https://github.com/OpenMined/PySyft.git`" - ] - }, - { - "cell_type": "markdown", - "id": "8", - "metadata": {}, - "source": [ - "## Installing Syft" - ] - }, - { - "cell_type": "markdown", - "id": "9", - "metadata": {}, - "source": [ - "To install Syft `cd` into the directory in which you cloned PySyft and type\n", - "\n", - "```bash\n", - "pip install -e packages/syft\n", - "```\n", - "\n", - "This installs `syft` in editable mode, such any change in code are reflected in your environment." - ] - }, - { - "cell_type": "markdown", - "id": "10", - "metadata": {}, - "source": [ - "## Running Tox Tests" - ] - }, - { - "cell_type": "markdown", - "id": "11", - "metadata": {}, - "source": [ - "[Tox](https://tox.wiki/en/latest/) is a project that \"aims to automate and standardize testing in Python\". For PySyft development, it is used to simplify testing and setting up several environment in a way that works for every developer working on PySyft. You can list the commands that you can execute using `tox-l`, which will give a result similar to this" - ] - }, - { - "cell_type": "markdown", - "id": "12", - "metadata": {}, - "source": [ - "```\n", - "> tox -l\n", - "\n", - "hagrid.publish\n", - "lint\n", - "stack.test.integration\n", - "syft.docs\n", - "syft.jupyter\n", - "syft.publish\n", - "syft.test.security\n", - "syft.test.unit\n", - "syft.test.notebook\n", - "stack.test.notebook\n", - "stack.test.vm\n", - "frontend.test.unit\n", - "frontend.test.e2e\n", - "frontend.generate.types\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "13", - "metadata": {}, - "source": [ - "This shows us the list of environments that are specified for PySyft. To see what these environments do, have a look at the `tox.ini` file in the main PySyft repo." - ] - }, - { - "cell_type": "markdown", - "id": "14", - "metadata": {}, - "source": [ - "You can run an environment using `tox -e `. For instance, to run the unit tests, run" - ] - }, - { - "cell_type": "markdown", - "id": "15", - "metadata": {}, - "source": [ - "```\n", - "tox -e syft.test.unit\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "16", - "metadata": {}, - "source": [ - "This tox environment is relatively simple, and just uses pytest to run all the tests for the syft packages. However, some environments are more complicated, and run a series of commands that start multiple processes, docker containers and set up a lot of infrastructure before running the tests. The good thing is that with tox, you dont need to worry about that, you can just run the commands." - ] - }, - { - "cell_type": "markdown", - "id": "17", - "metadata": {}, - "source": [ - "## Using Jupyter Environment" - ] - }, - { - "cell_type": "markdown", - "id": "18", - "metadata": {}, - "source": [ - "Pysyft has a tox command to set up a local jupyter notebook environment, which is useful for development." - ] - }, - { - "cell_type": "markdown", - "id": "19", - "metadata": {}, - "source": [ - "```\n", - "tox -e syft.jupyter\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "20", - "metadata": {}, - "source": [ - "PySyft makes extensive use of jupyter notebook, and a lot of developers use it for experiments when writing code. It can be useful to setup a local gitignore (only for you, not pushed to git) to have a playground where you can experiment, without needing to push files to git, or change the .gitignore. You can do this by adding a folder to your `.git/info/exclude` file, which works similar to the `.gitignore` file, e.g. if we add\n", - "```\n", - "notebooks/experimental/* \n", - "```\n", - "to `.git/info/exclude`, git wont sync the changes to the `experimental` folder to github\n", - "\n", - "`Note:` For developers in MS Windows, before development make sure that your development path does not contain any white spaces in between.\n", - "\n", - "Example:\n", - " \n", - "**Invalid Path:** `D:/test space/new env/openmined/PySyft`\n", - "\n", - "**Valid Path:** `D:/test-space/new_env/openmined/PySyft`\n", - "\n", - "The issue with paths containing spaces causing problems on Windows is due to the way that Windows handles file paths, but as long as the development path is free of white spaces, you are good to go. This is not a specific issue related to PySyft." - ] - }, - { - "cell_type": "markdown", - "id": "21", - "metadata": {}, - "source": [ - "## Working with Python Domain" - ] - }, - { - "cell_type": "markdown", - "id": "22", - "metadata": {}, - "source": [ - "PySyft enables a network of computers to connect to each other and do privacy preserving data analysis. The Nodes in the network that hold some data are called `Domains`. When we develop with PySyft, it is very common to start a domain as the first step. `PySyft` makes it very easy to develop against a domain in a notebook by providing an interface (`sy.orchestra`) that allows you to start a domain with a webserver in a notebook in the background, which is a lightweight version of a Domain that would be used in production. You can specify options such as what kind of database you are using, whether you want to use networking and how many processes you want to use. You can launch a Domain by simply executing:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "23", - "metadata": {}, - "outputs": [], - "source": [ - "# syft absolute\n", - "import syft as sy" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "24", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "node = sy.orchestra.launch(\n", - " name=\"dev-mode-example-domain-1\", port=8020, reset=True, dev_mode=True\n", - ")" - ] - }, - { - "cell_type": "markdown", - "id": "25", - "metadata": {}, - "source": [ - "If we dont need a webserver (for development this is true in many cases), we can omit the port and use. \n", - "```\n", - "node = sy.orchestra.launch(name=\"dev-mode-example-domain-1\", dev_mode=True, reset=True)\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "26", - "metadata": {}, - "source": [ - "**One of the benefits of not using a port is that you can use a debugger and set breakpoints within api calls. This makes debugging way faster in many cases**" - ] - }, - { - "cell_type": "markdown", - "id": "27", - "metadata": {}, - "source": [ - "Now, we are ready to start using the domain. The domain comes with standard login credentials for the admin (just for development)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "28", - "metadata": {}, - "outputs": [], - "source": [ - "client = node.login(email=\"info@openmined.org\", password=\"changethis\")" - ] - }, - { - "cell_type": "markdown", - "id": "29", - "metadata": {}, - "source": [ - "Once you are logged in, you are ready to start using the domain, for instance for creating a dataset (this one is empty, just as a example)." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "30", - "metadata": {}, - "outputs": [], - "source": [ - "dataset = sy.Dataset(name=\"my dataset\", asset_list=[])\n", - "client.upload_dataset(dataset)" - ] - }, - { - "cell_type": "markdown", - "id": "31", - "metadata": {}, - "source": [ - "Lastly to stop or terminate your Domain, we can execute the following command:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "32", - "metadata": {}, - "outputs": [], - "source": [ - "node.land()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "33", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.16" - }, - "toc": { - "base_numbering": 1, - "nav_menu": {}, - "number_sections": true, - "sideBar": true, - "skip_h1_title": false, - "title_cell": "Table of Contents", - "title_sidebar": "Contents", - "toc_cell": false, - "toc_position": {}, - "toc_section_display": true, - "toc_window_display": true - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/02-deployment-types.ipynb b/notebooks/tutorials/data-engineer/02-deployment-types.ipynb deleted file mode 100644 index 1bd572a26fe..00000000000 --- a/notebooks/tutorials/data-engineer/02-deployment-types.ipynb +++ /dev/null @@ -1,378 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deployment Types" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1", - "metadata": {}, - "outputs": [], - "source": [ - "# syft absolute\n", - "import syft as sy" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## Dev Python Domain\n" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "Syft supports creating a Python domain in editable mode.\n", - "This is used mainly for experimental and development purposes.\n", - "In __Dev Python Domain__ the domain instance runs locally using the SQLite as the main storage.\n", - "This enables faster development and requires less recources to operate.\n", - "\n", - "The __Dev Python Domain__ supports two options:\n", - "1. Memory node - full `syft` functionality __locally__, SQLite as a local storage.\n", - "2. Webserver node - full `syft` functionality with API \n", - "\n", - "__When you need this?__
\n", - "_When you want to develop Syft or try-out new funcitonality from separate branch._\n", - "\n", - "__Prerequistes:__
\n", - "1. Syft repository pulled from Github - [github.com/OpenMined/PySyft](https://github.com/OpenMined/PySyft)\n", - "\n", - "For broader explanation refer to the notebook [01-setting-dev-mode.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/01-setting-up-dev-mode.ipynb)\n", - "\n", - "To launch the local __Dev Python Domain__ use the following steps:" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "#### 1.1 Launch Dev Memory Node" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5", - "metadata": {}, - "outputs": [], - "source": [ - "memory_node = sy.orchestra.launch(\n", - " name=\"Arbitrary Dev Node\",\n", - " dev_mode=True,\n", - " reset=True,\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6", - "metadata": {}, - "outputs": [], - "source": [ - "assert memory_node is not None" - ] - }, - { - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "#### 1.2 Launch Dev Webserver Node" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8", - "metadata": {}, - "outputs": [], - "source": [ - "webserver_node = sy.orchestra.launch(\n", - " name=\"Arbitrary Webserver Dev Node\", dev_mode=True, reset=True, port=8081\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9", - "metadata": {}, - "outputs": [], - "source": [ - "assert webserver_node is not None" - ] - }, - { - "cell_type": "markdown", - "id": "10", - "metadata": {}, - "source": [ - "#### 2. Login Into Nodes" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "11", - "metadata": {}, - "outputs": [], - "source": [ - "memory_node_client = memory_node.login(\n", - " email=\"info@openmined.org\", password=\"changethis\"\n", - ")\n", - "memory_node_client" - ] - }, - { - "cell_type": "markdown", - "id": "12", - "metadata": {}, - "source": [ - "#### 3. Landing Memory and Webserver Node" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "13", - "metadata": {}, - "outputs": [], - "source": [ - "memory_node.land()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "14", - "metadata": {}, - "outputs": [], - "source": [ - "webserver_node.land()" - ] - }, - { - "cell_type": "markdown", - "id": "15", - "metadata": {}, - "source": [ - "----" - ] - }, - { - "cell_type": "markdown", - "id": "16", - "metadata": {}, - "source": [ - "## Single Container / Enclave (TBD)" - ] - }, - { - "cell_type": "markdown", - "id": "17", - "metadata": {}, - "source": [ - "Single Container deployment is used when fast and painless deployment of `syft` with all essential functionality is needed. This deployment type contains the `syft` and SQLite as a light-weight database in a single container.\n", - "\n", - "__When you need this?__
\n", - "_When you quickly want to test syft in a single container._\n", - "\n", - "__Prerequistes:__
\n", - "1. Syft repository pulled from Github - [github.com/OpenMined/PySyft](https://github.com/OpenMined/PySyft)\n", - "1. Docker Installed - [docs.docker.com/get-docker](https://docs.docker.com/get-docker/)\n" - ] - }, - { - "cell_type": "markdown", - "id": "18", - "metadata": {}, - "source": [ - "#### Deploy Syft in Single Container Mode" - ] - }, - { - "cell_type": "markdown", - "id": "19", - "metadata": {}, - "source": [ - "Enter the PySyft Repository and run the following command\n", - "\n", - "`docker run -it -e DEFAULT_ROOT_PASSWORD=secret -e PORT=8080 -p 8080:8080 openmined/grid-enclave:0.8.1`\n", - "\n", - "----" - ] - }, - { - "cell_type": "markdown", - "id": "20", - "metadata": {}, - "source": [ - "## Full Container Stack" - ] - }, - { - "cell_type": "markdown", - "id": "21", - "metadata": {}, - "source": [ - "Syft can operate as a container stack. This setting consider deployment of following containers:\n", - " - Backend - contains `Syft` and corresponding logic to execute code in _sync_ manner\n", - " - Backend Stream - contains `Syft` and logic to queue message in RabbitMQ\n", - " - Celery Worker - contains `Syft` and logic to execute message received from RabbitMQ\n", - " - RabbitMQ - receives messages from Backend Stream and passes them into Celery Worker\n", - " - Redis - each `syft` object has a `UUID`, and stored in Redis as a `key`/`value` pair\n", - " - Mongo - Stores non-private metadata that are related to `grid` operation, such as __RBAC__ or `BLOB`s metadata \n", - " - SeaweedFS - Stores the `BLOB`s, compatible with Amazon S3 protocols\n", - " - Jaeger - distributed end-to-end tracing\n", - "\n", - "__When you need this?__
\n", - "_When you need a Syft domain/gateway node locally._\n", - "\n", - "__Prerequistes:__
\n", - "1. Syft installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "1. Hagrid installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "1. Docker Installed - [docs.docker.com/get-docker](https://docs.docker.com/get-docker/)\n", - "\n", - "\n", - "Easiest way to launch the Full Container Stack is the `hagrid` cli tool.\n", - "\n", - "Basic syntax of Hagrdi deployment command is the following:
\n", - "> `hagrid launch to :`\n", - "\n", - "To deploy the full container stack use the following command:
\n", - "\n", - "> `hagrid launch test_domain domain to docker:8081`\n", - "\n", - "For detailed explanation of Full Container Stack deployment refer to the notebook [05-deploy-stack.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/05-deploy-stack.ipynb)" - ] - }, - { - "cell_type": "markdown", - "id": "22", - "metadata": {}, - "source": [ - "----" - ] - }, - { - "cell_type": "markdown", - "id": "23", - "metadata": {}, - "source": [ - "## VM Container Host" - ] - }, - { - "cell_type": "markdown", - "id": "24", - "metadata": {}, - "source": [ - "Ability to easily deploy `syft` stack to __anywhere__. By anywhere we mean an existing linux server accessible via `ssh` connection. `hagrid` cli tool can do all the hard work for us, by defining the desired system state using `ansible` and deploying all containers (defined in the previous section).\n", - "\n", - "__When you need this?__
\n", - "_When you need to deploy Syft domain/gateway node on a remote host, whether Virtual Machine or real Linux server._\n", - "\n", - "__Prerequistes:__
\n", - "1. Syft installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "2. Hagrid installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "3. VM accessible via SSH\n", - "\n", - "Deploy Syft `domain`/`network` node to the remote VM using following command:\n", - "\n", - "> `hagrid launch test_domain domain to 100.0.0.1 --username=ubuntu --auth-type=key --key-path=~/.ssh/hagrid_ssh_key`\n", - "\n", - "All flags marked with `--` are optional, if not provided `hagrid` will interactively ask you to provide all necessary details. More details on `hagrid` usage can be found in following notebook [03-hagrid.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/03-hagrid.ipynb)\n", - "\n", - "If you want to deploy to Cloud providers reffer to corresponding notebook:\n", - "- Azure - [06-deploy-to-azure.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/06-deploy-to-azure.ipynb)\n", - "- GCP - [07-deploy-to-gcp.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/07-deploy-to-gcp.ipynb)\n", - "- AWS - [08-deploy-to-aws.ipynb](https://github.com/OpenMined/PySyft/blob/dev/notebooks/tutorials/data-engineer/08-deploy-to-aws.ipynb)\n", - "\n", - ">__Note__: VM Container Host supports deployment _only from Linux or MacOS_ machines, since it requires `ansible`
that is not supported by Windows \n" - ] - }, - { - "cell_type": "markdown", - "id": "25", - "metadata": {}, - "source": [ - "----" - ] - }, - { - "cell_type": "markdown", - "id": "26", - "metadata": {}, - "source": [ - "## Gateway Nodes" - ] - }, - { - "cell_type": "markdown", - "id": "27", - "metadata": {}, - "source": [ - "Gateway Nodes are used to interconnect multiple `domain` nodes.\n", - "Essentially, `gateway` nodes use the same containers and code, although with different configurations.\n", - "`gateway` nodes do not have the Frontend and Blob storage. \n", - "\n", - "__When you need this?__
\n", - "_When you need to interconnect two or more domain nodes._\n", - "\n", - "__Prerequistes:__
\n", - "1. Syft installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "1. Hagrid installed - [pypi.org/project/syft](https://pypi.org/project/syft/)\n", - "1. Docker installed or SSH connection to VM\n", - "\n", - "The `hagrid` cli can be used to deploy the `gateway` nodes, as a local container stack deployment or remote VM host deployment.\n", - "\n", - "To deploy `gateway` node us the following command:
\n", - "> `hagrid launch gateway to :`\n", - "\n", - "Example of launching the `gateway` node called `test-gateway`:
\n", - "> `hagrid launch test-gateway gateway to docker:9082`\n" - ] - }, - { - "cell_type": "markdown", - "id": "28", - "metadata": {}, - "source": [ - "----" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/03-hagrid.ipynb b/notebooks/tutorials/data-engineer/03-hagrid.ipynb deleted file mode 100644 index 3ad7cf9c25d..00000000000 --- a/notebooks/tutorials/data-engineer/03-hagrid.ipynb +++ /dev/null @@ -1,73 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# HAGrid" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Installing HAGrid" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## Python PATH" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Debugging HAGrid" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "## Ansible and Windows" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/04-deploy-container.ipynb b/notebooks/tutorials/data-engineer/04-deploy-container.ipynb deleted file mode 100644 index dd016d74ae5..00000000000 --- a/notebooks/tutorials/data-engineer/04-deploy-container.ipynb +++ /dev/null @@ -1,107 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploying a Container" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Docker 1-liner" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "```\n", - "$ docker run -it -e DEFAULT_ROOT_PASSWORD=secret -e PORT=8080 -p 8080:8080 openmined/grid-enclave:0.8.2.b0\n", - "```" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Azure CLI" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "$ az group create --name test-container --location eastus" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "$ az container create --resource-group test-container --name syft --image openmined/grid-enclave:0.8.2.b0 --dns-name-label syft-demo --ports 80 --environment-variables PORT=80 DEFAULT_ROOT_PASSWORD=secret" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "## From HAGrid" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "## Volume Mounts" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/05-deploy-stack.ipynb b/notebooks/tutorials/data-engineer/05-deploy-stack.ipynb deleted file mode 100644 index 2ac0fcc7dff..00000000000 --- a/notebooks/tutorials/data-engineer/05-deploy-stack.ipynb +++ /dev/null @@ -1,81 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploy the Stack" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Docker Compose" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## HAGrid" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Build Source" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "## Volume Mounts" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "## Docker Networks" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/06-deploy-to-azure.ipynb b/notebooks/tutorials/data-engineer/06-deploy-to-azure.ipynb deleted file mode 100644 index 397d3f1016b..00000000000 --- a/notebooks/tutorials/data-engineer/06-deploy-to-azure.ipynb +++ /dev/null @@ -1,114 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploy to Azure" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Installing CLI Tool" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## Authorizing CLI Tool" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Deploying a Single Container" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "$ az group create --name test-container --location eastus" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "$ az container create --resource-group test-container --name syft --image openmined/grid-enclave:0.8.2.b0 --dns-name-label syft-demo --ports 80 --environment-variables PORT=80 DEFAULT_ROOT_PASSWORD=secret" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "## Deploying a Domain" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "## Checking Firewall Rules" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "8", - "metadata": {}, - "source": [ - "## Logging in via SSH" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/07-deploy-to-gcp.ipynb b/notebooks/tutorials/data-engineer/07-deploy-to-gcp.ipynb deleted file mode 100644 index 827f1d5e129..00000000000 --- a/notebooks/tutorials/data-engineer/07-deploy-to-gcp.ipynb +++ /dev/null @@ -1,73 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploy to Google Cloud Platform (GCP)" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Installing CLI Tool" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "## Authorizing CLI Tool" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Deploying a Domain" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "## Checking Firewall Rules" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "## Logging in via SSH" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/08-deploy-to-aws.ipynb b/notebooks/tutorials/data-engineer/08-deploy-to-aws.ipynb deleted file mode 100644 index 7b8a28ec777..00000000000 --- a/notebooks/tutorials/data-engineer/08-deploy-to-aws.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploy to AWS" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Installing CLI Tool" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "Please refer to the docs for installing the AWS CLI tool: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. It has instructions for the different operating systems such as Mac, Windows and Linux" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Authorizing CLI Tool" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "Please go through this for setting up the CLI: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html. \n", - "\n", - "A common/quick way is to use to authenticate using IAM user credentials. Please refer to this doc for the steps involved: https://docs.aws.amazon.com/cli/latest/userguide/cli-authentication-user.html" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "## Deploying a Domain" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "Use `hagrid launch {domain_name} domain to aws [--no-provision]` command to launch your domain to an AWS EC2 instance. The --no-provision flag is optional and can be used if you do not want to provision all the resources using ansible (If you're not familiar with this, just ignore this flag) " - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "You would be prompted with a series of questions.\n", - "\n", - "Please specify the region where you want your EC2 instance to be deployed.\n", - "\n", - "Please specify a name for the security group to be created. A security group is used to control the inbound and outbound traffic to/from the EC2 instance. Please check https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html for more information.\n", - "Then specify the IP addresses to be white-listed for incoming traffic to the EC2 instance. Please ensure that you enter it in CIDR notation. The default is 0.0.0.0/0 which means that all inbound traffic is allowed.\n", - "On these IP addresses, we open the following ports: 80, 443, 22.\n", - "\n", - "Then, please specify the EC2 instance type. By default, it is t2.xlarge.\n", - "\n", - "We need an EC2 key pair in order to SSH into the instance. If you already have a key-pair, please specify the name and the path where it is stored. Otherwise, if you do not have one, we will create one with the given name and store it in the path you specify. (Note: creating a keypair might not work properly with windows powershell).\n", - "\n", - "\n", - "Then specify the repo and branch for the source code. You can leave it as the default.\n", - "\n", - "\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "8", - "metadata": {}, - "source": [ - "## Checking Firewall Rules" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "9", - "metadata": {}, - "source": [ - "You could go to the AWS console, and navigate to the region where you deployed your instance. Search for EC2 and go over to the Security Groups tab (or directly search for Security Group). In the list of security groups, identify the one you created using the name. If you go inside, you would see the inbound and outbound rules." - ] - }, - { - "cell_type": "markdown", - "id": "10", - "metadata": {}, - "source": [ - "## Logging in via SSH" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "11", - "metadata": {}, - "source": [ - "Please refer to the steps in the doc to connect to your EC2 instance using SSH: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html" - ] - }, - { - "cell_type": "markdown", - "id": "12", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/09-deploying-enclave.ipynb b/notebooks/tutorials/data-engineer/09-deploying-enclave.ipynb deleted file mode 100644 index 11c0fba438e..00000000000 --- a/notebooks/tutorials/data-engineer/09-deploying-enclave.ipynb +++ /dev/null @@ -1,41 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Deploying an Enclave" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/10-custom-deployment.ipynb b/notebooks/tutorials/data-engineer/10-custom-deployment.ipynb deleted file mode 100644 index 11b2f707b35..00000000000 --- a/notebooks/tutorials/data-engineer/10-custom-deployment.ipynb +++ /dev/null @@ -1,97 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Custom Deployment" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## What you need" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "### Container Engine" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "### File Mounts" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "### Network Access" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "### Python Client" - ] - }, - { - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "### Red Hat and Podman" - ] - }, - { - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "### Kubernetes" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/tutorials/data-engineer/11-installing-and-upgrading-via-helm.ipynb b/notebooks/tutorials/data-engineer/11-installing-and-upgrading-via-helm.ipynb deleted file mode 100644 index 4775672f760..00000000000 --- a/notebooks/tutorials/data-engineer/11-installing-and-upgrading-via-helm.ipynb +++ /dev/null @@ -1,364 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Installing using Helm" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "## Add Helm Repo" - ] - }, - { - "cell_type": "markdown", - "id": "2", - "metadata": {}, - "source": [ - "```bash\n", - "helm repo add openmined https://openmined.github.io/PySyft/helm\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "3", - "metadata": {}, - "source": [ - "## Update Repo" - ] - }, - { - "cell_type": "markdown", - "id": "4", - "metadata": {}, - "source": [ - "```bash\n", - "helm repo update openmined\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "5", - "metadata": {}, - "source": [ - "## Search for available Chart versions" - ] - }, - { - "cell_type": "markdown", - "id": "6", - "metadata": {}, - "source": [ - "### Search for available versionsΒΆ" - ] - }, - { - "cell_type": "markdown", - "id": "7", - "metadata": {}, - "source": [ - "```bash\n", - "helm search repo openmined/syft --versions --devel\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "8", - "metadata": {}, - "source": [ - "### Set the version to install" - ] - }, - { - "cell_type": "markdown", - "id": "9", - "metadata": {}, - "source": [ - "```bash\n", - "export SYFT_VERSION=\"\"\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "10", - "metadata": {}, - "source": [ - "## Setup a registry" - ] - }, - { - "cell_type": "markdown", - "id": "11", - "metadata": {}, - "source": [ - "One needs to setup a registry either locally or on the cloud. To set one up locally, one can follow the following commands." - ] - }, - { - "cell_type": "markdown", - "id": "12", - "metadata": {}, - "source": [ - "```bash\n", - "k3d registry create registry.localhost --port 12345 -v `pwd`/k3d-registry:/var/lib/registry || true\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "13", - "metadata": {}, - "source": [ - "Setup a load balancer\n", - "\n", - "```bash\n", - "NODE_NAME=syft NODE_PORT=8080 && \\\n", - "k3d cluster create syft -p \"$NODE_PORT:80@loadbalancer\" --registry-use k3d-registry.localhost || true \\\n", - "k3d cluster start syft\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "14", - "metadata": {}, - "source": [ - "## Install using Helm" - ] - }, - { - "cell_type": "markdown", - "id": "15", - "metadata": {}, - "source": [ - "```bash\n", - "helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className=traefik\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "16", - "metadata": {}, - "source": [ - "# Upgrading using Helm" - ] - }, - { - "cell_type": "markdown", - "id": "17", - "metadata": {}, - "source": [ - "## Add Helm Repo" - ] - }, - { - "cell_type": "markdown", - "id": "18", - "metadata": {}, - "source": [ - "```bash\n", - "helm repo add openmined https://openmined.github.io/PySyft/helm\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "19", - "metadata": {}, - "source": [ - "## Update Repo" - ] - }, - { - "cell_type": "markdown", - "id": "20", - "metadata": {}, - "source": [ - "```bash\n", - "helm repo update openmined\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "21", - "metadata": {}, - "source": [ - "## Search for available Helm Chart versions" - ] - }, - { - "cell_type": "markdown", - "id": "22", - "metadata": {}, - "source": [ - "### Search for available versions" - ] - }, - { - "cell_type": "markdown", - "id": "23", - "metadata": {}, - "source": [ - "```bash\n", - "helm search repo openmined/syft --versions --devel\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "24", - "metadata": {}, - "source": [ - "### Set the target version" - ] - }, - { - "cell_type": "markdown", - "id": "25", - "metadata": {}, - "source": [ - "```bash\n", - "export TARGET_VERSION=\"\"\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "26", - "metadata": {}, - "source": [ - "## Get the current Helm release values (User Defined)" - ] - }, - { - "cell_type": "markdown", - "id": "27", - "metadata": {}, - "source": [ - "Set the release name and namespace\n", - "\n", - "```bash\n", - "export RELEASE_NAME=\"\"\n", - "export NAMESPACE=\"\"\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "28", - "metadata": {}, - "source": [ - "```bash\n", - "helm get values $RELEASE_NAME -n $NAMESPACE -o yaml > values.yaml\n", - "```\n", - "\n", - "
\n", - "\n", - "Use this file in the argument to helm upgrade command, for example:\n", - "\n", - "\n", - "`-f /home/user/values.yaml`\n", - "\n", - "\n", - "Save the path to a variable:\n", - "\n", - "```bash\n", - "export PATH_TO_VALUES=/home/user/values.yaml\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "29", - "metadata": {}, - "source": [ - "## Upgrade the Helm Chart" - ] - }, - { - "cell_type": "markdown", - "id": "30", - "metadata": {}, - "source": [ - "### Find out the number of nodes in the cluster." - ] - }, - { - "cell_type": "markdown", - "id": "31", - "metadata": {}, - "source": [ - "```bash\n", - "kubectl describe sts --namespace $NAMESPACE | grep 'Replicas'\n", - "```" - ] - }, - { - "cell_type": "markdown", - "id": "32", - "metadata": {}, - "source": [ - "### Upgrade the Helm chart." - ] - }, - { - "cell_type": "markdown", - "id": "33", - "metadata": {}, - "source": [ - "```bash\n", - "helm upgrade $RELEASE_NAME openmined/syft \\\n", - " --version $TARGET_VERSION \\\n", - " -f $PATH_TO_VALUES \\\n", - " --namespace $NAMESPACE\n", - "```" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.7" - }, - "toc": { - "base_numbering": 1, - "nav_menu": {}, - "number_sections": true, - "sideBar": true, - "skip_h1_title": false, - "title_cell": "Table of Contents", - "title_sidebar": "Contents", - "toc_cell": false, - "toc_position": {}, - "toc_section_display": true, - "toc_window_display": false - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From ca7cee0664ea5184316263c1a1fcfae37b2301ee Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 14:51:16 +0530 Subject: [PATCH 11/19] remove orchestra from imports --- packages/hagrid/hagrid/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index eabd22f9f19..c26d2694e22 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -10,8 +10,6 @@ from .version import __version__ # noqa: F401 from .wizard_ui import WizardUI -from .orchestra import Orchestra # noqa - def module_property(func: Any) -> None: """Decorator to turn module functions into properties. From a4d1729d114bf4b904181b69cc924f4d2172cdf8 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 15:09:13 +0530 Subject: [PATCH 12/19] updated ReadMe for hagrid deprecation --- README.md | 25 +++------- packages/syft/PYPI.md | 113 +++++++++++++++++++----------------------- 2 files changed, 56 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 25230bb43f9..8c26dd5c2ef 100644 --- a/README.md +++ b/README.md @@ -108,18 +108,11 @@ For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernete helm install ... --set ingress.class="gce" ``` -## Deploy to a Container Engine or Cloud +## Note: -1. Install our handy πŸ›΅ cli tool which makes deploying a Domain or Gateway server to Docker or VM a one-liner: - `pip install -U hagrid` +🚨 Our deployment tool `Hagrid` is `Deprecated` .For the updated deployment options kindly refer to -2. Then run our interactive jupyter Install πŸ§™πŸ½β€β™‚οΈ WizardBETA: - `hagrid quickstart` - -3. In the tutorial you will learn how to install and deploy: - `PySyft` = our `numpy`-like 🐍 Python library for computing on `private data` in someone else's `Domain` - - `PyGrid` = our 🐳 `docker` / 🐧 `vm` `Domain` & `Gateway` Servers where `private data` lives +- πŸ“š Deployments ## Docs and Support @@ -128,10 +121,8 @@ helm install ... --set ingress.class="gce" # Install Notes -- HAGrid 0.3 Requires: 🐍 `python` πŸ™ `git` - Run: `pip install -U hagrid` -- Interactive Install πŸ§™πŸ½β€β™‚οΈ WizardBETA Requires πŸ›΅ `hagrid`: - Run: `hagrid quickstart` - PySyft 0.8.1 Requires: 🐍 `python 3.10 - 3.12` - Run: `pip install -U syft` -- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` - Run: `hagrid launch ...` +- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` # Versions @@ -154,13 +145,9 @@ Deprecated: PySyft and PyGrid use the same `version` and its best to match them up where possible. We release weekly betas which can be used in each context: -PySyft (Stable): `pip install -U syft` -PyGrid (Stable) `hagrid launch ... tag=latest` - -PySyft (Beta): `pip install -U syft --pre` -PyGrid (Beta): `hagrid launch ... tag=beta` +PySyft (Stable): `pip install -U syft` -HAGrid is a cli / deployment tool so the latest version of `hagrid` is usually the best. +PySyft (Beta): `pip install -U syft --pre` # What is Syft? diff --git a/packages/syft/PYPI.md b/packages/syft/PYPI.md index 24f9dd81843..30c72ebf768 100644 --- a/packages/syft/PYPI.md +++ b/packages/syft/PYPI.md @@ -1,7 +1,7 @@


-Syft Logo +Syft Logo Perform data science on `data` that remains in `someone else's` server @@ -41,20 +41,20 @@ domain_client = sy.login(port=8080, email="info@openmined.org", password="change ## PySyft in 10 minutes -πŸ“ API Example Notebooks - -- 00-load-data.ipynb -- 01-submit-code.ipynb -- 02-review-code-and-approve.ipynb -- 03-data-scientist-download-result.ipynb -- 04-jax-example.ipynb -- 05-custom-policy.ipynb -- 06-multiple-code-requests.ipynb -- 07-domain-register-control-flow.ipynb -- 08-code-version.ipynb -- 09-blob-storage.ipynb -- 10-container-images.ipynb -- 11-container-images-k8s.ipynb +πŸ“ API Example Notebooks + +- 00-load-data.ipynb +- 01-submit-code.ipynb +- 02-review-code-and-approve.ipynb +- 03-data-scientist-download-result.ipynb +- 04-jax-example.ipynb +- 05-custom-policy.ipynb +- 06-multiple-code-requests.ipynb +- 07-domain-register-control-flow.ipynb +- 08-code-version.ipynb +- 09-blob-storage.ipynb +- 10-container-images.ipynb +- 11-container-images-k8s.ipynb ## Deploy Kubernetes Helm Chart @@ -105,18 +105,11 @@ For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernete helm install ... --set ingress.class="gce" ``` -## Deploy to a Container Engine or Cloud +## Note: -1. Install our handy πŸ›΅ cli tool which makes deploying a Domain or Gateway server to Docker or VM a one-liner: - `pip install -U hagrid` +🚨 Our deployment tool `Hagrid` is `Deprecated` .For the updated deployment options kindly refer to -2. Then run our interactive jupyter Install πŸ§™πŸ½β€β™‚οΈ WizardBETA: - `hagrid quickstart` - -3. In the tutorial you will learn how to install and deploy: - `PySyft` = our `numpy`-like 🐍 Python library for computing on `private data` in someone else's `Domain` - - `PyGrid` = our 🐳 `docker` / 🐧 `vm` `Domain` & `Gateway` Servers where `private data` lives +- πŸ“š Deployments ## Docs and Support @@ -125,10 +118,8 @@ helm install ... --set ingress.class="gce" # Install Notes -- HAGrid 0.3 Requires: 🐍 `python` πŸ™ `git` - Run: `pip install -U hagrid` -- Interactive Install πŸ§™πŸ½β€β™‚οΈ WizardBETA Requires πŸ›΅ `hagrid`: - Run: `hagrid quickstart` - PySyft 0.8.1 Requires: 🐍 `python 3.10 - 3.12` - Run: `pip install -U syft` -- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` - Run: `hagrid launch ...` +- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` # Versions @@ -151,17 +142,13 @@ Deprecated: PySyft and PyGrid use the same `version` and its best to match them up where possible. We release weekly betas which can be used in each context: -PySyft (Stable): `pip install -U syft` -PyGrid (Stable) `hagrid launch ... tag=latest` - -PySyft (Beta): `pip install -U syft --pre` -PyGrid (Beta): `hagrid launch ... tag=beta` +PySyft (Stable): `pip install -U syft` -HAGrid is a cli / deployment tool so the latest version of `hagrid` is usually the best. +PySyft (Beta): `pip install -U syft --pre` # What is Syft? -Syft +Syft `Syft` is OpenMined's `open source` stack that provides `secure` and `private` Data Science in Python. Syft decouples `private data` from model training, using techniques like [Federated Learning](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html), [Differential Privacy](https://en.wikipedia.org/wiki/Differential_privacy), and [Encrypted Computation](https://en.wikipedia.org/wiki/Homomorphic_encryption). This is done with a `numpy`-like interface and integration with `Deep Learning` frameworks, so that you as a `Data Scientist` can maintain your current workflow while using these new `privacy-enhancing techniques`. @@ -179,19 +166,19 @@ No more cold calls to get `access` to a dataset. No more weeks of `wait times` t
- +

Data Owner

-
+

Data Scientist

- +

Data Engineer

@@ -199,11 +186,11 @@ No more cold calls to get `access` to a dataset. No more weeks of `wait times` t -- Deploy a Domain Server -- Upload Private Data -- Create Accounts +- Deploy a Domain Server +- Upload Private Data +- Create Accounts - Manage Privacy Budget -- Join a Network +- Join a Network - Learn how PETs streamline Data Policies @@ -291,9 +278,9 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
- + - +
@@ -301,7 +288,7 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
- +

πŸŽ₯ PETs: Remote Data Science Unleashed - R gov 2021
@@ -320,9 +307,9 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat

- + - +
@@ -336,18 +323,18 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
- +
- +
- +
@@ -357,51 +344,51 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat OpenMined and Syft appreciates all contributors, if you would like to fix a bug or suggest a new feature, please see our [guidelines](https://openmined.github.io/PySyft/developer_guide/index.html).
-Contributors +Contributors # Supporters @@ -411,7 +398,7 @@ OpenMined and Syft appreciates all contributors, if you would like to fix a bug `OpenMined` is a fiscally sponsored `501(c)(3)` in the USA. We are funded by our generous supporters on Open Collective.

-Contributors +Contributors # Disclaimer From c66bffbed61a3eecf5b40a3fb58fdf3e0c1bd2a3 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 15:11:07 +0530 Subject: [PATCH 13/19] update pypi readme --- packages/syft/PYPI.md | 88 +++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/packages/syft/PYPI.md b/packages/syft/PYPI.md index 30c72ebf768..eacd86818f2 100644 --- a/packages/syft/PYPI.md +++ b/packages/syft/PYPI.md @@ -1,7 +1,7 @@


-Syft Logo +Syft Logo Perform data science on `data` that remains in `someone else's` server @@ -41,20 +41,20 @@ domain_client = sy.login(port=8080, email="info@openmined.org", password="change ## PySyft in 10 minutes -πŸ“ API Example Notebooks - -- 00-load-data.ipynb -- 01-submit-code.ipynb -- 02-review-code-and-approve.ipynb -- 03-data-scientist-download-result.ipynb -- 04-jax-example.ipynb -- 05-custom-policy.ipynb -- 06-multiple-code-requests.ipynb -- 07-domain-register-control-flow.ipynb -- 08-code-version.ipynb -- 09-blob-storage.ipynb -- 10-container-images.ipynb -- 11-container-images-k8s.ipynb +πŸ“ API Example Notebooks + +- 00-load-data.ipynb +- 01-submit-code.ipynb +- 02-review-code-and-approve.ipynb +- 03-data-scientist-download-result.ipynb +- 04-jax-example.ipynb +- 05-custom-policy.ipynb +- 06-multiple-code-requests.ipynb +- 07-domain-register-control-flow.ipynb +- 08-code-version.ipynb +- 09-blob-storage.ipynb +- 10-container-images.ipynb +- 11-container-images-k8s.ipynb ## Deploy Kubernetes Helm Chart @@ -148,7 +148,7 @@ PySyft (Beta): `pip install -U syft --pre` # What is Syft? -Syft +Syft `Syft` is OpenMined's `open source` stack that provides `secure` and `private` Data Science in Python. Syft decouples `private data` from model training, using techniques like [Federated Learning](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html), [Differential Privacy](https://en.wikipedia.org/wiki/Differential_privacy), and [Encrypted Computation](https://en.wikipedia.org/wiki/Homomorphic_encryption). This is done with a `numpy`-like interface and integration with `Deep Learning` frameworks, so that you as a `Data Scientist` can maintain your current workflow while using these new `privacy-enhancing techniques`. @@ -166,19 +166,19 @@ No more cold calls to get `access` to a dataset. No more weeks of `wait times` t @@ -186,11 +186,11 @@ No more cold calls to get `access` to a dataset. No more weeks of `wait times` t @@ -278,9 +278,9 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
- + - +
@@ -288,7 +288,7 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
- +

πŸŽ₯ PETs: Remote Data Science Unleashed - R gov 2021
@@ -307,9 +307,9 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat

- + - +
@@ -323,18 +323,18 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat
@@ -344,51 +344,51 @@ Provides services to a group of `Data Owners` and `Data Scientists`, such as dat OpenMined and Syft appreciates all contributors, if you would like to fix a bug or suggest a new feature, please see our [guidelines](https://openmined.github.io/PySyft/developer_guide/index.html).
-Contributors +Contributors # Supporters
- + - + - + - + - + - + - + - + - + - + - +
- +

Data Owner

-
+

Data Scientist

- +

Data Engineer

-- Deploy a Domain Server -- Upload Private Data -- Create Accounts +- Deploy a Domain Server +- Upload Private Data +- Create Accounts - Manage Privacy Budget -- Join a Network +- Join a Network - Learn how PETs streamline Data Policies
- +
- +
- +
@@ -398,7 +398,7 @@ OpenMined and Syft appreciates all contributors, if you would like to fix a bug `OpenMined` is a fiscally sponsored `501(c)(3)` in the USA. We are funded by our generous supporters on Open Collective.

-Contributors +Contributors # Disclaimer From 39fb19c59c6293092d07fb052f6c2f4115cce357 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 15:28:54 +0530 Subject: [PATCH 14/19] added deprecation notice to hagrid --- packages/hagrid/hagrid/__init__.py | 14 ++++++++++++++ packages/hagrid/hagrid/cli.py | 8 ++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index c26d2694e22..5a58c66adf8 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -4,12 +4,26 @@ import sys from typing import Any +# third party +from rich import print + # relative from .cli import check_status as check # noqa: F401 from .quickstart_ui import QuickstartUI from .version import __version__ # noqa: F401 from .wizard_ui import WizardUI +# Add a Deprecation warning for the old `hagrid` module +print("\n" * 1) +print("=" * 80) +print("DEPRECATION WARNING") +print("=" * 80) +print("The Hagrid CLI deployment tool is now deprecated.") +print("Kindly use the new deployment options available in the below link") +print("https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments") +print("=" * 80) +print("\n" * 1) + def module_property(func: Any) -> None: """Decorator to turn module functions into properties. diff --git a/packages/hagrid/hagrid/cli.py b/packages/hagrid/hagrid/cli.py index 0e8efdc06a4..da51e648dfe 100644 --- a/packages/hagrid/hagrid/cli.py +++ b/packages/hagrid/hagrid/cli.py @@ -87,7 +87,6 @@ from .quickstart_ui import quickstart_download_notebook from .rand_sec import generate_sec_random_password from .stable_version import LATEST_STABLE_SYFT -from .style import RichGroup from .util import fix_windows_virtualenv_api from .util import from_url from .util import shell @@ -113,7 +112,12 @@ def get_azure_image(short_name: str) -> str: raise Exception(f"Image name doesn't exist: {short_name}. Try: default or 0.7.0") -@click.group(cls=RichGroup) +class NoHelpGroup(click.Group): + def get_help(self, ctx: Any) -> str: + return "" + + +@click.group(cls=NoHelpGroup) def cli() -> None: pass From fb6e33d97bde8442568ea0a45d744e7da24ec670 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Fri, 17 May 2024 15:52:56 +0530 Subject: [PATCH 15/19] Add hagrid deprecation notice and disable all CLI commands --- packages/hagrid/hagrid/__init__.py | 25 ++++++++++++++++---- packages/hagrid/hagrid/cli.py | 37 +++++++++--------------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index eabd22f9f19..9ac13d13d24 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -1,16 +1,33 @@ -from .git_check import verify_git_installation # noqa - # stdlib import sys from typing import Any +# third party +import rich + # relative -from .cli import check_status as check # noqa: F401 from .quickstart_ui import QuickstartUI from .version import __version__ # noqa: F401 from .wizard_ui import WizardUI -from .orchestra import Orchestra # noqa +console = rich.get_console() +table = rich.table.Table(show_header=False) +table.add_column(justify="center") +table.add_row( + "🚨🚨🚨 Hagrid has been deprecated. 🚨🚨🚨", + style=rich.style.Style( + bold=True, + color="red", + ), +) +table.add_row( + "Please refer to https://github.com/OpenMined/PySyft/notebooks/" + "tutorials/deployments/00-deployment-types.ipynb for the deployment instructions.", + style=rich.style.Style( + color=None, + ), +) +console.print(table) def module_property(func: Any) -> None: diff --git a/packages/hagrid/hagrid/cli.py b/packages/hagrid/hagrid/cli.py index 0e8efdc06a4..07bb03ca436 100644 --- a/packages/hagrid/hagrid/cli.py +++ b/packages/hagrid/hagrid/cli.py @@ -87,7 +87,6 @@ from .quickstart_ui import quickstart_download_notebook from .rand_sec import generate_sec_random_password from .stable_version import LATEST_STABLE_SYFT -from .style import RichGroup from .util import fix_windows_virtualenv_api from .util import from_url from .util import shell @@ -113,7 +112,7 @@ def get_azure_image(short_name: str) -> str: raise Exception(f"Image name doesn't exist: {short_name}. Try: default or 0.7.0") -@click.group(cls=RichGroup) +@click.command def cli() -> None: pass @@ -3457,11 +3456,6 @@ def land(args: tuple[str], **kwargs: Any) -> None: print("Hagrid land aborted.") -cli.add_command(launch) -cli.add_command(land) -cli.add_command(clean) - - @click.command( help="Show HAGrid debug information", context_settings={"show_default": True} ) @@ -3474,9 +3468,6 @@ def debug(args: tuple[str], **kwargs: Any) -> None: print("\n=================================================================\n\n") -cli.add_command(debug) - - DEFAULT_HEALTH_CHECKS = ["host", "UI (Ξ²eta)", "api", "ssh", "jupyter"] HEALTH_CHECK_FUNCTIONS = { "host": check_host, @@ -3819,9 +3810,6 @@ def check_status( print("Video Explanation: https://youtu.be/BJhlCxerQP4 \n") -cli.add_command(check) - - # add Hagrid info to the cli @click.command(help="Show HAGrid info", context_settings={"show_default": True}) def version() -> None: @@ -3830,9 +3818,6 @@ def version() -> None: print(f"HAGRID_REPO_SHA: {commit_hash()}") -cli.add_command(version) - - def run_quickstart( url: str | None = None, syft: str = "latest", @@ -4074,9 +4059,6 @@ def quickstart_cli( ) -cli.add_command(quickstart_cli, "quickstart") - - def display_jupyter_url(url_parts: tuple[str, str, int]) -> None: url = url_parts[0] if is_gitpod(): @@ -4236,9 +4218,6 @@ def dagobah(zip_file: str) -> None: return run_quickstart(zip_file=zip_file) -cli.add_command(dagobah) - - def ssh_into_remote_machine( host_ip: str, username: str, @@ -4326,9 +4305,6 @@ def ssh(ip_address: str, cmd: str) -> None: ) -cli.add_command(ssh) - - # Add hagrid logs command to the CLI @click.command( help="Get the logs of the HAGrid node", context_settings={"show_default": True} @@ -4401,4 +4377,13 @@ def logs(domain_name: str) -> None: # nosec + " [bold green]HAPPY DEBUGGING! πŸ›πŸžπŸ¦—πŸ¦ŸπŸ¦ πŸ¦ πŸ¦ [/bold green]\n " ) -cli.add_command(logs) +# cli.add_command(launch) +# cli.add_command(land) +# cli.add_command(clean) +# cli.add_command(debug) +# cli.add_command(check) +# cli.add_command(version) +# cli.add_command(quickstart_cli, "quickstart") +# cli.add_command(dagobah) +# cli.add_command(ssh) +# cli.add_command(logs) From db688d037499aed96eb856348b2e4b3354068b48 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 16:03:27 +0530 Subject: [PATCH 16/19] Revert "added deprecation notice to hagrid" This reverts commit 39fb19c59c6293092d07fb052f6c2f4115cce357. --- packages/hagrid/hagrid/__init__.py | 14 -------------- packages/hagrid/hagrid/cli.py | 8 ++------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index 5a58c66adf8..c26d2694e22 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -4,26 +4,12 @@ import sys from typing import Any -# third party -from rich import print - # relative from .cli import check_status as check # noqa: F401 from .quickstart_ui import QuickstartUI from .version import __version__ # noqa: F401 from .wizard_ui import WizardUI -# Add a Deprecation warning for the old `hagrid` module -print("\n" * 1) -print("=" * 80) -print("DEPRECATION WARNING") -print("=" * 80) -print("The Hagrid CLI deployment tool is now deprecated.") -print("Kindly use the new deployment options available in the below link") -print("https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments") -print("=" * 80) -print("\n" * 1) - def module_property(func: Any) -> None: """Decorator to turn module functions into properties. diff --git a/packages/hagrid/hagrid/cli.py b/packages/hagrid/hagrid/cli.py index da51e648dfe..0e8efdc06a4 100644 --- a/packages/hagrid/hagrid/cli.py +++ b/packages/hagrid/hagrid/cli.py @@ -87,6 +87,7 @@ from .quickstart_ui import quickstart_download_notebook from .rand_sec import generate_sec_random_password from .stable_version import LATEST_STABLE_SYFT +from .style import RichGroup from .util import fix_windows_virtualenv_api from .util import from_url from .util import shell @@ -112,12 +113,7 @@ def get_azure_image(short_name: str) -> str: raise Exception(f"Image name doesn't exist: {short_name}. Try: default or 0.7.0") -class NoHelpGroup(click.Group): - def get_help(self, ctx: Any) -> str: - return "" - - -@click.group(cls=NoHelpGroup) +@click.group(cls=RichGroup) def cli() -> None: pass From ba565ce6c153c3dfc614447b19293fde1e430240 Mon Sep 17 00:00:00 2001 From: Tauquir <30658453+itstauq@users.noreply.github.com> Date: Fri, 17 May 2024 16:15:19 +0530 Subject: [PATCH 17/19] Fix minor typo and stray whitespaces --- README.md | 4 ++-- packages/hagrid/hagrid/__init__.py | 1 - packages/syft/PYPI.md | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8c26dd5c2ef..48e0a38c5cb 100644 --- a/README.md +++ b/README.md @@ -110,9 +110,9 @@ helm install ... --set ingress.class="gce" ## Note: -🚨 Our deployment tool `Hagrid` is `Deprecated` .For the updated deployment options kindly refer to +🚨 Our deployment tool `Hagrid` has been `Deprecated`. For the updated deployment options kindly refer to -- πŸ“š Deployments +- πŸ“š Deployments ## Docs and Support diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index e314d046875..9ac13d13d24 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -10,7 +10,6 @@ from .version import __version__ # noqa: F401 from .wizard_ui import WizardUI - console = rich.get_console() table = rich.table.Table(show_header=False) table.add_column(justify="center") diff --git a/packages/syft/PYPI.md b/packages/syft/PYPI.md index eacd86818f2..516d053e0e8 100644 --- a/packages/syft/PYPI.md +++ b/packages/syft/PYPI.md @@ -107,9 +107,9 @@ helm install ... --set ingress.class="gce" ## Note: -🚨 Our deployment tool `Hagrid` is `Deprecated` .For the updated deployment options kindly refer to +🚨 Our deployment tool `Hagrid` has been `Deprecated`. For the updated deployment options kindly refer to -- πŸ“š Deployments +- πŸ“š Deployments ## Docs and Support From c435bc1e6b752766e0db52e1abdd17f5876b0eb9 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 17 May 2024 16:27:18 +0530 Subject: [PATCH 18/19] adding hyperlink to the deprecation --- packages/hagrid/hagrid/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/hagrid/hagrid/__init__.py b/packages/hagrid/hagrid/__init__.py index 9ac13d13d24..55e2021ff1f 100644 --- a/packages/hagrid/hagrid/__init__.py +++ b/packages/hagrid/hagrid/__init__.py @@ -4,6 +4,7 @@ # third party import rich +from rich.text import Text # relative from .quickstart_ui import QuickstartUI @@ -20,13 +21,12 @@ color="red", ), ) -table.add_row( - "Please refer to https://github.com/OpenMined/PySyft/notebooks/" - "tutorials/deployments/00-deployment-types.ipynb for the deployment instructions.", - style=rich.style.Style( - color=None, - ), -) +link = "https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments" +link_text = Text(link, style="link " + link + " cyan") +normal_text = Text("Please refer to ") +normal_text.append(link_text) +normal_text.append(" for the deployment instructions.") +table.add_row(normal_text) console.print(table) From c10b0e413c625abde6ad0fd4c3fb4f87148e91cf Mon Sep 17 00:00:00 2001 From: alfred-openmined-bot <145415986+alfred-openmined-bot@users.noreply.github.com> Date: Fri, 17 May 2024 11:04:14 +0000 Subject: [PATCH 19/19] [hagrid] bump version --- packages/hagrid/.bumpversion.cfg | 2 +- packages/hagrid/hagrid/manifest_template.yml | 4 ++-- packages/hagrid/hagrid/version.py | 2 +- packages/hagrid/setup.py | 2 +- scripts/hagrid_hash | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hagrid/.bumpversion.cfg b/packages/hagrid/.bumpversion.cfg index a30678ab82f..733b610d5bc 100644 --- a/packages/hagrid/.bumpversion.cfg +++ b/packages/hagrid/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.121 +current_version = 0.3.122 tag = False tag_name = {new_version} commit = True diff --git a/packages/hagrid/hagrid/manifest_template.yml b/packages/hagrid/hagrid/manifest_template.yml index 552fdb3efd7..eb7c5c9b3d6 100644 --- a/packages/hagrid/hagrid/manifest_template.yml +++ b/packages/hagrid/hagrid/manifest_template.yml @@ -1,9 +1,9 @@ manifestVersion: 0.1 -hagrid_version: 0.3.121 +hagrid_version: 0.3.122 syft_version: 0.8.7-beta.7 dockerTag: 0.8.7-beta.7 baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/ -hash: 4333433d5bec7bb9bcd52db59029d3bcb23c74c2 +hash: a4268fab7ad76cd2e854b259660879f15e213824 target_dir: ~/.hagrid/PySyft/ files: grid: diff --git a/packages/hagrid/hagrid/version.py b/packages/hagrid/hagrid/version.py index 22a3553ca00..6d599e5c8e7 100644 --- a/packages/hagrid/hagrid/version.py +++ b/packages/hagrid/hagrid/version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # HAGrid Version -__version__ = "0.3.121" +__version__ = "0.3.122" if __name__ == "__main__": print(__version__) diff --git a/packages/hagrid/setup.py b/packages/hagrid/setup.py index 5dc9c72f5e4..1d273539441 100644 --- a/packages/hagrid/setup.py +++ b/packages/hagrid/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages from setuptools import setup -__version__ = "0.3.121" +__version__ = "0.3.122" DATA_FILES = {"img": ["hagrid/img/*.png"], "hagrid": ["*.yml"]} diff --git a/scripts/hagrid_hash b/scripts/hagrid_hash index 715b59990cc..6372fec9252 100644 --- a/scripts/hagrid_hash +++ b/scripts/hagrid_hash @@ -1 +1 @@ -56f89d45a711a6bf79a460fc8cd4ae20 +d18b821cb0778e437426c9a066158bec
- + - + - + - + - + - + - + - + - + - + - +