Skip to content

Commit

Permalink
Changed image path to not use relative path.
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Sep 17, 2024
1 parent 99d79d7 commit 9122ca9
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions docs/HowToCreateAWSSagemakerNotebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,162 +6,162 @@ AWS offers different types of Notebook instances: SageMaker Studio, SageMaker No

1. In AWS console, type **Amazon SageMaker** in search bar and click it:

![selectsagemaker](../images/images_for_creating_AWS_notebooks/Screenshot1.png)
![selectsagemaker](/images/images_for_creating_AWS_notebooks/Screenshot1.png)

2. On the left side bar click **Notebooks**:

![Notebooks](../images/images_for_creating_AWS_notebooks/Screenshot2.png)
![Notebooks](/images/images_for_creating_AWS_notebooks/Screenshot2.png)

3. Click **Create notebook instance**:

![create_new_notebook](../images/images_for_creating_AWS_notebooks/Screenshot3.png)
![create_new_notebook](/images/images_for_creating_AWS_notebooks/Screenshot3.png)

4. Give a name to your notebook. Choose a notebook instance type based on needs, Amazon Linux 2 as platform identifier, volume. Optional, create idle-shut by selecting create new lifecycle configuration and copy and paste [idle-shutdown.sh](../idle-shutdown.sh) and create configuration. Then click Create notebook instance:

![environment](../images/images_for_creating_AWS_notebooks/Screenshot4.png)
![environment](/images/images_for_creating_AWS_notebooks/Screenshot4.png)

5. It will take about 5 minutes, your notebook instance to get ready:

![pending](../images/images_for_creating_AWS_notebooks/Screenshot5.png)
![pending](/images/images_for_creating_AWS_notebooks/Screenshot5.png)


6. **Open Jupyter Lab**:

![jupyterlab](../images/images_for_creating_AWS_notebooks/Screenshot6.png)
![jupyterlab](/images/images_for_creating_AWS_notebooks/Screenshot6.png)

7. Upload your jupyter notebook

![upload](../images/images_for_creating_AWS_notebooks/Screenshot7.png)
![upload](/images/images_for_creating_AWS_notebooks/Screenshot7.png)

8. Select the kernel:

![kernel](../images/images_for_creating_AWS_notebooks/Screenshot8.png)
![kernel](/images/images_for_creating_AWS_notebooks/Screenshot8.png)

9. **IMPORTANT**: **Stop** the kernel at end of your work to avoid getting charged.

![resize image](../images/images_for_creating_AWS_notebooks/Screenshot9.png)
![resize image](/images/images_for_creating_AWS_notebooks/Screenshot9.png)



### Set up SageMaker Studio

1. In AWS console, type **Amazon SageMaker** in search bar and click it:

![selectsagemaker](../images/images_for_creating_AWS_notebooks/Screenshot1.png)
![selectsagemaker](/images/images_for_creating_AWS_notebooks/Screenshot1.png)

2. On the left side bar click **Domains**:

![Domains](../images/images_for_creating_AWS_notebooks/Screenshot10.png)
![Domains](/images/images_for_creating_AWS_notebooks/Screenshot10.png)

3. Click **Create domain**:

![Create_domain](../images/images_for_creating_AWS_notebooks/Screenshot11.png)
![Create_domain](/images/images_for_creating_AWS_notebooks/Screenshot11.png)

4. Select **Set up for single user (Quick setup)** and then click **Set up**:

![Domain Setup](../images/images_for_creating_AWS_notebooks/Screenshot12.png)
![Domain Setup](/images/images_for_creating_AWS_notebooks/Screenshot12.png)

5. It will take a few minutes for the domain to setup:

![pending](../images/images_for_creating_AWS_notebooks/Screenshot13.png)
![pending](/images/images_for_creating_AWS_notebooks/Screenshot13.png)

6. Once the SageMaker Domain is setup, click **Studio** on the left sidebar:

![Studio](../images/images_for_creating_AWS_notebooks/Screenshot14.png)
![Studio](/images/images_for_creating_AWS_notebooks/Screenshot14.png)

7. Make sure that **Select Domain** and **Select user profile** contain domain and user then click **Open Studio**:

![Launch Studio](../images/images_for_creating_AWS_notebooks/Screenshot15.png)
![Launch Studio](/images/images_for_creating_AWS_notebooks/Screenshot15.png)

8. This should take you to SageMaker Studio home:

![SageMaker Studio Home](../images/images_for_creating_AWS_notebooks/Screenshot16.png)
![SageMaker Studio Home](/images/images_for_creating_AWS_notebooks/Screenshot16.png)


### Option 1 - JupyterLab

1. Once in studio select **JupyterLab** on the top left under **Applications**:

![Launch JupyterLab](../images/images_for_creating_AWS_notebooks/Screenshot17.png)
![Launch JupyterLab](/images/images_for_creating_AWS_notebooks/Screenshot17.png)

2. Select **Create JupyterLab Space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot18.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot18.png)

3. Assign a name to the space,choose either to share domain or create private space, then select **Create Space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot19.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot19.png)

4. Choose **Instance** and **Storage(GB)** based upon expected usage then select **Run space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot20.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot20.png)

5. Wait for the space to start up and then select Open JupyterLab once ready:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot21.png)
![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot22.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot21.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot22.png)

6. After you are done working go back to JupyterLab and shutoff your instance by clicking Stop:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot23.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot23.png)

7. Wait until the status shows stopped for all unused instances:

![Launch JupyterLab](../images/images_for_creating_AWS_notebooks/Screenshot24.png)
![Launch JupyterLab](/images/images_for_creating_AWS_notebooks/Screenshot24.png)



### Option 2 - Code Editor

1. Once in studio select **Code Editor** on the top left under **Applications**:

![Launch JupyterLab](../images/images_for_creating_AWS_notebooks/Screenshot25.png)
![Launch JupyterLab](/images/images_for_creating_AWS_notebooks/Screenshot25.png)

2. Select **Create Code Editor Space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot26.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot26.png)

3. Assign a name to the space and select **Create Space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot27.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot27.png)

4. Choose **Instance** and **Storage(GB)** based upon expected usage then select **Run space**:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot28.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot28.png)

5. Wait for the space to start up and then select ***Open Code Editor*** once ready:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot29.png)
![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot30.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot29.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot30.png)

6. After working go back to Code Editor and stop the now unused instance by clicking ***Stop***:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot31.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot31.png)

7. Wait for the Status to show as Stopped:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot32.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot32.png)


### Managing Running Instances
To check the active resources the Running Instances section was added. Below explains where it is and how to check what is actively running.

1. Go to **Running insances** within SageMaker Studio and make sure all instances being unused are stopped. If there are unused instances in the Running status select the associated stop action:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot33.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot33.png)

2. Wait for the instances to stop:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot34.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot34.png)



### Deleting Instances
1. Go to the Domain you are seeking to delete a instance. :

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot35.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot35.png)

2. After go to **Running insances** within SageMaker Studio and make sure all instances being unused are stopped:

![JupyterLab Space](../images/images_for_creating_AWS_notebooks/Screenshot36.png)
![JupyterLab Space](/images/images_for_creating_AWS_notebooks/Screenshot36.png)

0 comments on commit 9122ca9

Please sign in to comment.