google-deepmind / lab

A customisable 3D platform for agent-based AI research
Other
7.06k stars 1.36k forks source link

MacOS installation issues #246

Closed elliottower closed 1 year ago

elliottower commented 1 year ago

Similar to #242 but I would like to install DM lab on my mac, and have had issues doing so. Have been able to get it working with Linux on a docker container, but adapting the script from #242 to work on Mac leads to some issues. Here is the script I am trying to run: https://github.com/Farama-Foundation/Shimmy/blob/main/scripts/install_dm_lab.sh

If anyone has successfully installed on mac I would appreciate help.

bash bin/install_dm_lab.sh                                                                                                                                               (shimmy) 13.5s  Tue Apr  4 16:29:57 2023
Warning: bazel 6.1.1 is already installed and up-to-date.
To reinstall 6.1.1, run:
  brew reinstall bazel
Requirement already satisfied: numpy in /Users/elliottower/anaconda3/envs/shimmy/lib/python3.9/site-packages (1.24.2)
Cloning into 'lab'...
remote: Enumerating objects: 7778, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 7778 (delta 65), reused 148 (delta 62), pack-reused 7613
Receiving objects: 100% (7778/7778), 449.35 MiB | 11.17 MiB/s, done.
Resolving deltas: 100% (4821/4821), done.
Updating files: 100% (2602/2602), done.
Starting local Bazel server and connecting to it...
INFO: Analyzed target //python/pip_package:build_pip_package (86 packages loaded, 4298 targets configured).
INFO: Found 1 target...
ERROR: /Users/elliottower/Documents/GitHub/Shimmy/lab/BUILD:825:11: Compiling engine/code/renderergl1/tr_backend.c failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //:game_lib_headless_osmesa) external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 83 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from engine/code/renderergl1/tr_backend.c:22:
In file included from engine/code/renderergl1/tr_local.h:31:
In file included from engine/code/renderergl1/../renderercommon/tr_common.h:28:
engine/code/renderergl1/../renderercommon/qgl.h:32:11: fatal error: 'SDL_opengl.h' file not found
#       include <SDL_opengl.h>
                ^~~~~~~~~~~~~~
1 error generated.
ERROR: /Users/elliottower/Documents/GitHub/Shimmy/lab/BUILD:871:11: Compiling engine/code/renderercommon/tr_image_jpg.c failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //:game_lib_headless_egl) external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 88 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from engine/code/renderercommon/tr_image_jpg.c:25:
In file included from engine/code/renderercommon/tr_common.h:28:
engine/code/renderercommon/qgl.h:32:11: fatal error: 'SDL_opengl.h' file not found
#       include <SDL_opengl.h>
                ^~~~~~~~~~~~~~
1 error generated.
ERROR: /Users/elliottower/Documents/GitHub/Shimmy/lab/BUILD:825:11: Compiling engine/code/renderercommon/tr_model.c failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //:game_lib_headless_osmesa) external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 83 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from engine/code/renderercommon/tr_model.c:22:
In file included from engine/code/renderercommon/tr_common.h:28:
engine/code/renderercommon/qgl.h:32:11: fatal error: 'SDL_opengl.h' file not found
#       include <SDL_opengl.h>
                ^~~~~~~~~~~~~~
1 error generated.
Target //python/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.344s, Critical Path: 2.84s
INFO: 14 processes: 13 internal, 1 darwin-sandbox.
FAILED: Build did NOT complete successfully
tkoeppe commented 1 year ago

There's no MacOS support for the headless use of DeepMind Lab. See also #76. All we have working is the headful SDL "game" mode that gives you a human-usable UI (see the "macos" branch; in particular its modified README). For the headless use as an RL environment, someone would need to implement a "headless glimp" version for MacOS.

elliottower commented 1 year ago

Thanks for the info, my bad I should’ve seen that there’s no support

aalvan commented 5 months ago

Hello @elliottower, I have tried to create a dockerfile to run DM, but I have not succeeded. Could you please share your file? I have problems with OpenGL.

elliottower commented 5 months ago

There’s a script which was made six months ago linked in the OP, can’t guarantee it works with new versions though haven’t used it in a while. There’s also a Dockerfile that we use here, which is used in CI testing https://github.com/Farama-Foundation/Shimmy/blob/main/bin/dm_lab.Dockerfile

aalvan commented 5 months ago

Thanks for your help.