Skip to content

Commit

Permalink
Undo the glfw_renderer patch. The issue seems to be resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharif1093 committed Sep 5, 2019
1 parent 95d4b26 commit a0825d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 111 deletions.
34 changes: 0 additions & 34 deletions doc/notes/01 Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ Prerequisites
.. note::
If you are a student, you can use the free Student License for MuJoCo.

.. warning::
Because of an issue in ``dm_control``'s ``glfw`` initialization, the regular version
of ``dm_control`` will not work with ``Digideep``. To fix the issue check :ref:`FixGLFW`.


Installation
------------

Expand All @@ -31,35 +26,6 @@ Simply download the package using the following command and add it to your ``PYT
pip install -e .
.. _FixGLFW:

Patch ``dm_control`` initialization issue
-----------------------------------------

Go to the ``digideep`` installation path. Run the following:

.. code-block:: python
cd <digideep_path>
cp patch/glfw_renderer.py `pip show dm_control | grep -Po 'Location: (\K.*)'`/dm_control/_render
Or, alternatively go to the ``dm_control`` installation path, and find the ``dm_control/_render/glfw_renderer.py`` file.
In that file, move the following block of code to the beginning of the ``def _platform_init(self, max_width, max_height)`` function:

.. code-block:: python
try:
glfw.init()
except glfw.GLFWError as exc:
_, exc, tb = sys.exc_info()
six.reraise(ImportError, ImportError(str(exc)), tb)
.. note::

This change is required to use ``dm_control`` in multi-worker environments. The master thread should never initialize the ``glfw``
like this if it is going to be forked to parallel threads.


Set your environment
--------------------

Expand Down
77 changes: 0 additions & 77 deletions patch/glfw_renderer.py

This file was deleted.

0 comments on commit a0825d9

Please sign in to comment.