Skip to content

Commit da4191b

Browse files
authored
Refactor README.md file to divide the folder into 2 sections: (GoogleCloudPlatform#3686)
1. Jupyter Notebooks tutorials using AI Platform notebooks. 2. AI Platform API code samples https://cloud.google.com/ai-platform/notebooks/docs/reference/rest
1 parent 2895655 commit da4191b

File tree

4 files changed

+79
-6
lines changed

4 files changed

+79
-6
lines changed

notebooks/README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
1-
# Notebook Tutorials
1+
# AI Platform Notebooks
22

3-
This directory contains Jupyter notebook tutorials for Google Cloud Platform.
4-
The tutorials assume you have performed the following steps:
3+
[AI Platform Notebooks](https://cloud.google.com/ai-platform-notebooks)
4+
is a managed service that offers an integrated and secure JupyterLab
5+
environment for data scientists and machine learning developers to
6+
experiment, develop, and deploy models into production.
57

6-
1. Install Jupyter notebooks ([instructions](https://jupyter.org/install))
8+
This directory contains AI Platform Notebooks code samples and
9+
tutorials. The tutorials are divided into 2 sections:
10+
- AI Platform Notebooks [API code samples](samples)
11+
- AI Platform Notebooks [tutorials](tutorials)
12+
13+
## Notebooks API
14+
15+
In [this](samples) folder you will find Python code samples to interact
16+
with the
17+
[AI Platform Notebooks API](https://cloud.google.com/ai-platform/notebooks/docs/reference/rest)
18+
19+
## AI Platform Notebooks tutorials
20+
21+
**Run in AI Platform Notebooks**
22+
23+
1. Create a Notebook
24+
[instance](https://cloud.google.com/ai-platform/notebooks/docs#how-to)
25+
2. Clone this repository via Jupyter console or using the Git clone
26+
button
27+
28+
```bash
29+
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
30+
```
31+
32+
3. Open the tutorials folder and open the Jupyter notebooks
33+
34+
35+
**Run locally**
36+
37+
1. Install Jupyter notebooks
38+
([instructions](https://jupyter.org/install))
739
1. Install the dependencies in the [requirements.txt](./requirements.txt) file ([instructions below](#install-the-dependencies))
840
1. Registered the `google-cloud-bigquery` magic commands ([instructions below](#register-magics-and-configure-matplotlib))
941
1. Set `matplotlib` to render inline ([instructions below](#register-magics-and-configure-matplotlib))
1042

11-
## Install the dependencies
43+
### Install the dependencies
1244

1345
Install the dependencies with the following command:
1446

1547
pip install --upgrade -r requirements.txt
1648

17-
## Register magics and configure matplotlib
49+
### Register magics and configure matplotlib
1850

1951
You can either perform these set up steps in a single notebook, or add the
2052
steps to your IPython configuration file to apply to all notebooks.

notebooks/samples/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# AI Platform Notebooks API code samples
2+
3+
Sample command-line programs for interacting with the Notebooks API.
4+
5+
## Prerequisites to run locally:
6+
7+
* [Python 3](https://www.python.org/downloads/)
8+
* [pip](https://pypi.python.org/pypi/pip)
9+
10+
Go to the [Google Cloud Console](https://console.cloud.google.com).
11+
12+
Under API Manager, search for the Google Cloud Notebooks API and enable
13+
it. You can also enable API via Command Line:
14+
15+
```bash
16+
gcloud services enable notebooks.googleapis.com
17+
```
18+
19+
## Set Up Your Local Dev Environment
20+
21+
To install, run the following commands. If you want to use
22+
[virtualenv](https://virtualenv.readthedocs.org/en/latest/)
23+
(recommended), run the commands within a virtualenv.
24+
25+
```bash
26+
pip install -r requirements.txt
27+
```
28+
29+
**Note:** While this sample demonstrates interacting with Notebooks via
30+
the API, the functionality demonstrated here could also be accomplished
31+
using the Cloud Console or the
32+
[gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/beta/notebooks)
33+
34+
## Authentication
35+
36+
Please see the
37+
[Google cloud authentication guide](https://cloud.google.com/docs/authentication/).
38+
The recommended approach to running these samples is a Service Account
39+
with a JSON key.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest==5.3.2

notebooks/samples/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-api-python-client>=1.8.2

0 commit comments

Comments
 (0)