Compare commits

...
Author SHA1 Message Date
Andrew FerlitschandGitHub 30e4657ca2 Fix install TF 2023-06-07 13:04:37 -07:00
Andrew FerlitschandGitHub a18e172fe5 TF 2023-06-07 12:41:46 -07:00
Andrew Ferlitsch cad3e9ed30 fix: boilerplate reduction 77 2023-06-07 19:27:57 +00:00
@@ -153,39 +153,6 @@
"to generate a cost estimate based on your projected usage."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "1fD9UZaygyPG"
},
"source": [
"## Set up your local development environment\n",
"\n",
"**If you are using Colab or Vertex AI Workbench**, your environment already meets all the requirements to run this notebook. You can skip this step.\n",
"\n",
"Otherwise, make sure your environment meets this notebook's requirements. You need the following:\n",
"\n",
"- Git\n",
"- Python 3\n",
"- virtualenv\n",
"- Jupyter notebook running in a virtual environment with Python 3\n",
"\n",
"To quickly set up your environment to meet the requirements of this tutorial, perform the following:\n",
"\n",
"1. [Install and initialize the SDK](https://cloud.google.com/sdk/docs/).\n",
"\n",
"2. [Install Python 3](https://cloud.google.com/python/setup#installing_python).\n",
"\n",
"3. [Install virtualenv](https://cloud.google.com/python/setup#installing_and_using_virtualenv) and create a virtual environment that uses Python 3 and activate the virtual environment.\n",
"\n",
"4. Install Jupyter by running the following command in a terminal shell:\n",
"<br> `pip3 install jupyter`\n",
"\n",
"5. Launch Jupyter by running the following command in a terminal shell: <br> `jupyter notebook`\n",
"\n",
"6. Open this tutorial notebook in the Jupyter Notebook Dashboard."
]
},
{
"cell_type": "markdown",
"metadata": {
@@ -205,20 +172,7 @@
},
"outputs": [],
"source": [
"import os\n",
"\n",
"# The Vertex AI Workbench Notebook product has specific requirements\n",
"IS_WORKBENCH_NOTEBOOK = os.getenv(\"DL_ANACONDA_HOME\")\n",
"IS_USER_MANAGED_WORKBENCH_NOTEBOOK = os.path.exists(\n",
" \"/opt/deeplearning/metadata/env_version\"\n",
")\n",
"\n",
"# Vertex AI Notebook requires dependencies to be installed with '--user'\n",
"USER_FLAG = \"\"\n",
"if IS_WORKBENCH_NOTEBOOK:\n",
" USER_FLAG = \"--user\"\n",
"\n",
"! pip3 install --upgrade google-cloud-aiplatform[tensorboard] tensorflow==2.7 {USER_FLAG} -q"
"! pip3 install --upgrade --quiet google-cloud-aiplatform[tensorboard] tensorflow"
]
},
{