You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/science/af3-slurm/examples/simple_ipynb_launcher/Setup-post-cluster-deployment.md
+14-24Lines changed: 14 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,7 @@
1
-
# Setup: Post-Cluster Deployment
2
-
3
-
This guide explains how to deploy and access the Jupyter Notebook environment for AlphaFold **after the af3-slurm.yaml cluster has already been deployed** with SLURM REST support enabled.
1
+
# Setup: Setup AF3 with Simple Ipynb Launcher - PART 2: IPython notebook setup
2
+
This guide explains how to deploy and access the Jupyter Notebook environment for AlphaFold **after the af3-slurm.yaml cluster has been deployed** with **SLURM REST support enabled**. If you have not followed the steps outlined in [Setup-pre-cluster-deployment.md](./Setup-pre-cluster-deployment.md) before, please do so before continuing.
4
3
5
4
## Prerequisites
6
-
7
5
Before proceeding, ensure the following configuration values were set correctly in your `af3-slurm-deployment.yaml` file **prior to deploying the SLURM cluster**:
8
6
9
7
```yaml
@@ -12,18 +10,10 @@ slurm_rest_token_secret_name: "<your-secret-name>" # Name of your Sec
12
10
af3ipynb_bucket: "<your-pre-existing-bucket-name>"# Existing Cloud Storage bucket name
13
11
```
14
12
15
-
> [!WARNING]
16
-
> This guide assumes that the SLURM cluster is already deployed with REST API support enabled—i.e., the values above were correctly set before deployment.
17
-
> If any of the values above were omitted or misconfigured, you must destroy the cluster, update the deployment configuration, and redeploy. These settings are essential for enabling SLURM REST-based notebook functionality.
18
-
> This document focuses exclusively on deploying and accessing the Jupyter Notebook environment **after** the cluster is running and properly configured. It does not cover modifying or redeploying the cluster.
19
-
20
-
If you have **not yet deployed** the cluster, or if you need help setting the appropriate variables prior to deployment, refer to [Setup-pre-cluster-deployment.md](./Setup-pre-cluster-deployment.md) guide.
21
-
22
13
## Deploying the Jupyter Notebook Blueprint
23
14
24
15
### 1. Upload the required Notebook to the Cloud Storage Bucket
25
-
26
-
First, access the controller node of your deployed SLURM cluster. Replace placeholders `<controller-node-name>` and `<your-zone>` with your actual node and zone.
16
+
Access the controller node of your deployed cluster (replace placeholders `<controller-node-name>` and `<your-zone>` with your actual node and zone):
This step uploads the notebook (`slurm-rest-api-notebook.ipynb`) along with its required scripts and libraries to the bucket defined in the `af3ipynb_bucket` variable in `af3-slurm-deployment.yaml` file.
40
-
Make sure that this bucket was created and specified during the SLURM cluster deployment process.
41
30
42
31
### 2. Grant Secret Access to the Notebook's Service Account
32
+
**Where to run**: **On your local machine** (where the gcloud CLI is authenticated with access to your GCP project).
43
33
44
-
This setting ensures that the notebook server can successfully retrieve the specified secret by name.
45
-
Make sure the service account running the Jupyter Notebook instance (typically the Compute Engine default service account) has permission to access the Secret Manager secret that stores your SLURM REST token.
34
+
This setting ensures that the notebook server can successfully retrieve the specified secret by name. For this you need to make sure that the service account running the Jupyter Notebook instance (typically the Compute Engine default service account) has permission to access the Secret Manager secret that stores your SLURM REST token.
46
35
47
36
The following command grants the Compute Engine default service account the `roles/secretmanager.secretAccessor` role, allowing it to access the specified secret in Secret Manager. The attached condition always evaluates to true, ensuring access is consistently granted.
48
37
@@ -57,7 +46,8 @@ You can verify this configuration in the Secret Manager section of the Google Cl
### 5. Access the Notebook via Vertex AI Workbench
74
-
61
+
### 4. Access the Notebook via Vertex AI Workbench
75
62
In the Google Cloud Console:
76
63
77
64
1. Navigate to `Vertex AI` → `Workbench` → `Instances`
@@ -80,7 +67,8 @@ In the Google Cloud Console:
80
67
81
68
3. Locate and open the `slurm-rest-api-notebook.ipynb` file. If you haven't modified the default value of `af3ipynb_bucket_local_mount` in the `af3-slurm-deployment.yaml`, the notebook should be available at `/home/jupyter/alphafold` folder.
82
69
83
-
### 6. Verify REST Token Access
70
+
### 5. Verify REST Token Access
71
+
**Where to run**: **Inside the JupyterLab terminal** of your deployed Vertex AI Workbench instance.
84
72
85
73
To verify that Secret Manager access is properly configured, open a terminal within JupyterLab and run the following command:
86
74
@@ -93,7 +81,6 @@ If the command returns the secret value successfully, it confirms that the noteb
To remove the Jupyter Notebook deployment when it is no longer needed, run the following command:
98
85
99
86
```bash
@@ -105,7 +92,10 @@ To remove the Jupyter Notebook deployment when it is no longer needed, run the f
105
92
> Additionally, any Cloud Storage buckets you created (via the CLI or console) will not be automatically deleted. You are responsible for cleaning them up manually to avoid unnecessary charges.
106
93
> For deleting the buckets consult [Delete buckets](https://cloud.google.com/storage/docs/deleting-buckets).
107
94
108
-
## Notes and Customization
95
+
## Customization
109
96
You can adjust the notebook setup behavior using blueprint variables in the deployment YAML.
110
97
All configurations should be validated before running jobs.
111
98
If further modifications to SLURM REST/API Server behavior are required, you must destroy and redeploy the cluster with the updated settings.
99
+
100
+
## Using the environment
101
+
Go to [Ipynb.md](./Ipynb.md) for documentation on how to use the IPython environment.
This guide explains how to properly set up and launch the Simple IPython Launcher environment **before deploying the `af3-slurm.yaml` cluster**.
1
+
# Setup AF3 with Simple Ipynb Launcher - PART 1: specific cluster settings
2
+
This guide explains the additional steps needed to deploy the AF3 solution with the Slurm REST-API required by the [Simple Ipynb launcher](./README.md).
3
3
4
-
> **Important:** This setup documentation is intended to be followed **before** deploying the SLURM cluster (as referenced [here](../../README.md#deploy-slurm-cluster)).
5
-
> If you have **already deployed** the cluster, please refer to [`post-cluster-deployment.md`](./Setup-post-cluster-deployment.md) instead.
4
+
> [!NOTE]
5
+
> **Important:** The steps described here are intended to be followed **before** deploying the SLURM cluster (as referenced [here](../../README.md#deploy-slurm-cluster)).
6
+
> If you have **already deployed** the cluster, you should tear down the cluster and redeploy after the steps outlined here. Once your cluster is deployed, you will have to follow the steps outlined in [Setup AF3 with Simple Ipynb Launcher - PART 2: IPython notebook setup](./Setup-post-cluster-deployment.md)
6
7
7
8
## Prerequisites
8
9
9
-
### Set up Jobs Bucket
10
-
11
-
If you want to use the simple service launcher, you need to create an additional bucket, that should
12
-
be located in the region where you stand up your cluster:
10
+
### Set up Bucket for IPython Notebook
11
+
If you want to use the Simple ipynb launcher, you need to create an additional bucket for the IPython Notebook that is provided by Google Vertex AI Workbench. It should be located in the region where you stand up your cluster:
You can deploy a Jupyter Notebook environment to run AlphaFold step-by-step. This is useful for interactive exploration and making custom modifications to the AlphaFold pipeline.
30
-
31
-
> **Important:** To enable the Jupyter Notebook deployment, you **must provide a cloud storage bucket**. If no bucket is specified, the notebook environment will not be created.
26
+
### Configure Secret Manager
27
+
The IPython notebook will need a secure connection with the Slurm REST API servers. We are using the Google Cloud Secret Manager to manage the necessary credentials in a secure way. Please follow the guideline [here](https://cloud.google.com/secret-manager/docs/create-secret-quickstart) to create a Secret Manager.
32
28
33
-
### Enable the SLURM REST API Server
29
+
You do not need to manually add any data to the secret; the SLURM token will be automatically populated by the system.
34
30
35
-
Set the `slurm_rest_server_activate` value to `true` in the `af3-slurm-deployment.yaml` file to enable the SLURM REST API server on the controller node of the `af3-slurm.yaml` cluster. This allows the Jupyter Notebook environment to send requests—such as job submissions—to the SLURM scheduler via the REST API.
31
+
## Modify the af3-slurm-deployment.yaml
32
+
Set the `slurm_rest_server_activate` value to `true` in the `af3-slurm-deployment.yaml` file to enable the SLURM REST API server on the controller node of the `af3-slurm.yaml` cluster. This is required for the Jupyter Notebook environment to send requests —such as job submissions— to the SLURM scheduler via the REST API.
36
33
37
34
```yaml
38
35
slurm_rest_server_activate: true
39
36
```
40
37
41
-
### Configuring the SLURM REST API Token Secret Manager
42
-
43
-
Set `slurm_rest_token_secret_name` value in the `af3-slurm-deployment.yaml` with the name of an existing secret in Secret Manager. Please follow the guideline [here](https://cloud.google.com/secret-manager/docs/create-secret-quickstart) to create a Secret Manager.
44
-
45
-
> This setting allows you to specify the name of a Google Cloud Secret Manager secret that holds your SLURM authentication token. Using Secret Manager is a secure way to manage sensitive credentials.
38
+
Set the `slurm_rest_token_secret_name` value in the `af3-slurm-deployment.yaml` with the name of the secret you created as part of the [Prerequisites](#prerequisites).
To upload the Jupyter notebook to the cloud storage bucket so it can be accessed via JupyterLab:
70
-
71
-
1. **SSH into controller node** in the cluster.
72
-
73
-
2. **Navigate to the setup directory**:
74
-
75
-
```bash
76
-
cd /home/af3ipynb/ipynb_setup
77
-
```
78
-
79
-
3. Run the Ansible playbook to upload the Jupyter notebook and its required library files to the designated bucket:
80
-
81
-
```bash
82
-
ansible-playbook ipynb-upload-config.yml
83
-
```
84
-
85
-
This playbook will upload `slurm-rest-api-notebook.ipynb` along with its associated scripts and library files to the target bucket (`af3ipynb_bucket`).
86
-
Once the upload is complete, you can access the notebook from the JupyterLab interface via:
87
-
88
-
> Cloud Console → Vertex AI → Workbench → Instances
89
-
90
-
## Granting Access to the Token
44
+
Set the `af3ipynb_bucket` value in the `af3-slurm-deployment.yaml` with the name of the secret you created as part of the [Prerequisites](#prerequisites).
91
45
92
-
> Before running this section, please complete the [**Upload Notebook to Bucket**](#upload-notebook-to-bucket) section first.
93
-
94
-
After the deploying steps are success, you must ensure that the appropriate service account (e.g., the default service account for the Compute Engine instance) has permission to access the secret. This step is crucial because, without access to the secret, the notebook will not be able to authenticate properly or send valid requests to the SLURM REST API.
95
-
96
-
If you have not granted access yet, then run the following command, replacing `<your-secret-name>` and `<your-project-id>` with your values:
--condition="expression=true,title=AlwaysTrue,description=Allow access to Secret Manager"
103
-
```
104
-
105
-
This command grants the Compute Engine default service account the `secretAccessor` role with a condition that always evaluates to true, as shown in the image below. You can view this in the `Secret Manager` page in the Google Cloud Console.
This setting allows the notebook server to successfully retrieve the value of the specified secret by its name.
110
-
111
-
### Verify Access
112
-
113
-
To confirm that the service account has the necessary permissions, from the jupyter notebook workbench, you can open a terminal and run the following command:
If the command succeeds, this confirms that your notebook can securely retrieve the authentication token from Secret Manager as shown in the image below.
> If you do not destroy the Jupyter Notebook deployment, it may continue to incur costs.
140
-
> Additionally, any Cloud Storage buckets you created (via the CLI or console) will not be automatically deleted. You are responsible for cleaning them up manually to avoid unnecessary charges.
141
-
> For deleting the buckets consult [Delete buckets](https://cloud.google.com/storage/docs/deleting-buckets).
50
+
## Continue to cluster deployment
51
+
Go back to [Deploy Slurm Cluster](../../README.md#deploy-slurm-cluster) and deploy the cluster.
0 commit comments