Comments (10)
Hijacking this issue to ask for some clarification about the lua API: as far as I can see, right now lua_api.md and tensor.md are providing a basic lua interface, however it doesn't seem to be particularly built around Torch.
Are you planning to add a full Torch interface any time soon? Otherwise I might put some effort in writing a wrapper over the next couple of weeks.
from lab.
@edran: Although I can't promise how the future will play out, I believe that at the moment we have no plans to offer actual Torch bindings. The API was designed with the goal of familiarity and simplicity, not interoperability.
from lab.
Fair enough :)
from lab.
My machine seems to meet all requirements and even tensorflow library imports in python2.7. But I don't get how to install OpenGL because I opted out when installing cuda. I am using Ubuntu16.04 and GTX card. Thank you.
from lab.
Update: I added experimental Python 3 support to the Python extension. See 3fd8582 for a demo of Python code that can run under both Py2 and Py3. Note that in Py3, strings coming out of the DMLab environment (e.g. string observations produced by Lua scripts) need to be valid UTF-8.
Please consult the Bazel documentation for how to select a Python version for py_binary
and py_test
targets (https://docs.bazel.build/versions/master/be/python.html#py_binary_args). You may want to set the default_python_version
attribute.
from lab.
Update: I've put together a few commits that might enable a few useful things on macOS in the new "macos" branch.
To try it out, grab the branch and adjust the library paths in WORKSPACE to match your system (presumably to find your homebrew library installations). You should be able to run the levels with windowed output, e.g.:
bazel run -c opt --define graphics=sdl //:game -- --level_script lt_chasm
bazel run -c opt --define graphics=sdl //:python_random_agent -- --length=10000 --width=640 --height=480
This was all pretty straightforward. What doesn't work is the "headless" mode that you will most likely want to train agents efficiently, and that's where the hard part lies.
All of this is only very poorly tested and documented, so don't be surprised if something doesn't work. We don't really have the means to develop or test this, so rather than sending bug reports, please send pull requests that fix things, or at least precise descriptions of what goes wrong.
Things that are currently missing or broken:
-
None of the existing headless renderers work (OSMesa, EGL, GLX). This may just be a matter of installing the right dependencies.
-
There was a proposed native renderer in #76, but I'm not sure if it's working right, or at all.
-
I think text map compilation doesn't work, but I'm not sure why.
-
There seems to be a linking problem whereby our own MD5 library is mistakenly not used and instead the system's OpenSSL library is used, which then crashes. This can perhaps be avoided via
--dynamic_mode=off
, but then that might not work with SDL. -
Remember to always pass
--apple_platform_type=macos
to all Bazel invocations.
from lab.
For OSMesa you need at least one of these drivers: swrast, softpipe, llvmpipe or swr (SWR is not yet supported on macOS, so avoid --with-gallium-drivers=swrast ).
For GLX, run this command defaults write org.macosforge.xquartz.X11 enable_iglx -bool true (it worked for me on Mojave).
EGL I have not done anything about yet.
from lab.
@MrQbit: Thanks! Do you know how I get <GL/glext.h>
to be found? I added the linker option -framework OpenGL
to //:game_lib_headless_glx
, but I still don't find the header. It does exist on disk at /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/glext.h.
Also, are there any relatively "natural" ways to install OSMesa plus drivers on macOS?
from lab.
I am trying to reproduce the issue with the header file.
Your question about OSMesa, I do not know of any native method, to make it worse OpenGL support in MacOS is deprecated, the renderer is Metal, Metal 2 in Mojave.
I am new with lab trying to go through the code to see if I can find a cleaner way.
from lab.
Thank you -- it's by no means necessary or important to have OSMesa. We just need one headless renderer, and the alternatives besides OSMesa are EGL, GLX (?) and whatever native API macOS has. As you can see from the branch, and from #76, we have a proposal for some sort of native renderer, but it doesn't seem to quite work, and it's suspicious that it's missing thread switching logic.
from lab.
Related Issues (20)
- Make random maze as Capture The Flag mode HOT 2
- RuntimeError: Failed to connect RL API HOT 4
- ImportError: deepmind_lab.so: undefined symbol: PyString_Type error occurred when I was running DeepMind Lab HOT 5
- RuntimeError: Failed to connect RL API
- Reset() environment to a specific state? HOT 2
- Failed to find function dmlab_connect in library! RuntimeError: Failed to connect RL API
- Adding "I-maze" map/environment HOT 5
- Access camera params (extrinsics, intrinsics, near/far plane) for pointcloud calculation HOT 1
- How to produce deterministic episode? HOT 1
- custom environment
- Bazel Build Error: no such target '@platforms//cpu:wasm32': target 'wasm32' not declared in package 'cpu' HOT 3
- Disable Velocity HOT 1
- Problem with Bazel Python3 build HOT 2
- Wheel not supported error HOT 6
- Change the speed of the agent dynamically
- Build fails with message about C++14 being required even with a C++14-capable compiler HOT 2
- Complete installation script for Ubuntu 20.04 HOT 5
- Banino et. al. Grid Cells explore_goal_locations and explore_obstructed_goals HOT 1
- MacOS installation issues HOT 5
- When I run bazel run :python_random_agent --define graphics=sdl -- \ --length=10000 --width=640 --height=480 in Ubuntu 20.04, I meet the following error. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lab.