Fix tutorial colab so it selects a GPU runtime by default.
"agent's components and connecting them manually.\n",
"\n",
"This colab is best run with a GPU runtime, and in particular, the last cell will\n",
- "not run without it. (Please bear with us while we remove this requirement.) In\n",
- "order to select a GPU runtime, click on `Runtime \u003e Change runtime type` and then\n",
- "select `GPU` from the `Hardware type` dropdown menu."
+ "not run without it. This should be the default in this colab but in case it\n",
+ "isn't, you can select a GPU runtime, by clicking on\n",
+ "`Runtime \u003e Change runtime type` and then selecting `GPU` from the\n",
+ "`Hardware type` dropdown menu."
]
},
{
},
"outputs": [],
"source": [
+ "%env MUJOCO_GL=egl\n",
"from typing import Sequence, Tuple\n",
"\n",
"from dm_control import suite\n",
},
"outputs": [],
"source": [
- "# This is required for now as this cell uses GPU rendering. We are working on\n",
- "# removing this requirement. See the instructions in the title cell to select a\n",
- "# runtime with a GPU.\n",
- "%env MUJOCO_GL=egl\n",
- "\n",
"# Make the environment render frames and produce videos of episodes.\n",
"eval_environment = wrappers.MujocoVideoWrapper(environment, record_every=1)\n",
"\n",
" timestep = eval_environment.step(action)\n",
"\n",
"# Embed the HTML video.\n",
- "HTML(eval_environment.make_html_animation())"
+ "eval_environment.make_html_animation();"
]
}
],
"metadata": {
+ "accelerator": "GPU",
"colab": {
"collapsed_sections": [],
"last_runtime": {
