Commit a0b0cd9c authored by Andrew Cowie's avatar Andrew Cowie Committed by Copybara-Service
Browse files

Set environment variables before any other code is executed.

PiperOrigin-RevId: 495028896
Change-Id: I3b1a6ddceca1961bffdaba443e7db47bbfbc4fad
parent 569eb4fe
......@@ -65,6 +65,11 @@
},
"outputs": [],
"source": [
"# Set environment variables before running any other code.\n",
"import os\n",
"os.environ['TF_FORCE_UNIFIED_MEMORY'] = '1'\n",
"os.environ['XLA_PYTHON_CLIENT_MEM_FRACTION'] = '4.0'\n",
"\n",
"#@title 1. Install third-party software\n",
"\n",
"#@markdown Please execute this cell by pressing the _Play_ button\n",
......@@ -190,12 +195,7 @@
"# Make sure everything we need is on the path.\n",
"import sys\n",
"sys.path.append('/opt/conda/lib/python3.8/site-packages')\n",
"sys.path.append('/content/alphafold')\n",
"\n",
"# Make sure all necessary environment variables are set.\n",
"import os\n",
"os.environ['TF_FORCE_UNIFIED_MEMORY'] = '1'\n",
"os.environ['XLA_PYTHON_CLIENT_MEM_FRACTION'] = '2.0'"
"sys.path.append('/content/alphafold')"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment