Skip to content

Commit

Permalink
Update tutorial notebook to use the latest version of dm_control.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 423779850
Change-Id: I271656b080d88a9a75bd21f08fb6299a884af43b
  • Loading branch information
saran-t authored and copybara-github committed Jan 24, 2022
1 parent 0f69d28 commit 962a6a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def is_excluded(s):

setup(
name='dm_control',
version='0.0.423378775',
version='0.0.423779850',
description='Continuous control environments and MuJoCo Python bindings.',
author='DeepMind',
license='Apache License, Version 2.0',
Expand Down
19 changes: 11 additions & 8 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@
"\n",
"print('Installing OpenGL dependencies...')\n",
"!apt-get update -qq\n",
"!apt-get install -qq -y --no-install-recommends libglew2.0 > /dev/null\n",
"!apt-get install -qq -y --no-install-recommends libglew2.0 \u003e /dev/null\n",
"\n",
"print('Downloading MuJoCo...')\n",
"MUJOCO_VERSION = 210\n",
"BASE_URL = 'https://github.com/deepmind/mujoco/releases/download'\n",
"MUJOCO_VERSION = '2.1.1'\n",
"MUJOCO_ARCHIVE = (\n",
" f'mujoco{MUJOCO_VERSION}-{distutils.util.get_platform()}.tar.gz')\n",
"!wget -q \"https://mujoco.org/download/{MUJOCO_ARCHIVE}\"\n",
"!wget -q \"https://mujoco.org/download/{MUJOCO_ARCHIVE}.sha256\"\n",
" f'mujoco-{MUJOCO_VERSION}-{distutils.util.get_platform()}.tar.gz')\n",
"!wget -q \"{BASE_URL}/{MUJOCO_VERSION}/{MUJOCO_ARCHIVE}\"\n",
"!wget -q \"{BASE_URL}/{MUJOCO_VERSION}/{MUJOCO_ARCHIVE}.sha256\"\n",
"check_result = !shasum -c \"{MUJOCO_ARCHIVE}.sha256\"\n",
"if _exit_code:\n",
" raise RuntimeError(\n",
Expand All @@ -101,8 +102,8 @@
"%env MUJOCO_GL=egl\n",
"\n",
"print('Installing dm_control...')\n",
"# TODO(b/211110746): Upgrade to the latest version once PyPI package is out.\n",
"!pip install -q dm_control==0.0.403778684\n",
"# Version 0.0.416848645 is the first one to support MuJoCo 2.1.1.\n",
"!pip install -q dm_control\u003e=0.0.416848645\n",
"\n",
"print('Checking that the dm_control installation succeeded...')\n",
"try:\n",
Expand All @@ -116,7 +117,9 @@
" 'If using a hosted Colab runtime, make sure you enable GPU acceleration '\n",
" 'by going to the Runtime menu and selecting \"Choose runtime type\".')\n",
"else:\n",
" del suite, env, pixels"
" del suite, env, pixels\n",
"\n",
"!echo Installed dm_control $(pip show dm_control | grep -Po \"(?\u003c=Version: ).+\")"
]
},
{
Expand Down

0 comments on commit 962a6a2

Please sign in to comment.