google-deepmind / lab2d

A customisable 2D platform for agent-based AI research

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No instructions for building dmlab2d from source

DJayalath opened this issue · comments

The README.md at https://github.com/deepmind/meltingpot instructs users to check the README.md in this repository for details on installing dmlab2d from source if there is no appropriate wheel on PyPi. There are no instructions given in this README.

Previously, I was able to install dmlab2d via the ./install-dmlab2d.sh script in previous editions of MeltingPot. This no longer works, giving a series of errors:

ERROR: /home/dhj26/.cache/bazel/_bazel_dhj26/2e165e68acd8599382bee991110c23fb/external/luajit_archive/BUILD.bazel:281:10: Middleman _middlemen/@luajit_Uarchive_S_S_Cbuildvm-BazelCppSemantics_build_arch_k8-opt-exec-2B5CBBC6 failed: missing input file '@luajit_archive//:src/luajit.h'
ERROR: /home/dhj26/.cache/bazel/_bazel_dhj26/2e165e68acd8599382bee991110c23fb/external/luajit_archive/BUILD.bazel:281:10: Middleman _middlemen/@luajit_Uarchive_S_S_Cbuildvm-BazelCppSemantics_build_arch_k8-opt-exec-2B5CBBC6 failed: 1 input file(s) do not exist
Target //dmlab2d:dmlab2d_wheel failed to build
ERROR: /home/dhj26/.cache/bazel/_bazel_dhj26/2e165e68acd8599382bee991110c23fb/external/luajit_archive/BUILD.bazel:281:10 Middleman _middlemen/@luajit_Uarchive_S_S_Cbuildvm-BazelCppSemantics_build_arch_k8-opt-exec-2B5CBBC6 failed: 1 input file(s) do not exist
INFO: Elapsed time: 247.903s, Critical Path: 2.92s
INFO: 182 processes: 29 internal, 153 linux-sandbox.
FAILED: Build did NOT complete successfully

I assume this is expected as that install script is no longer in the latest version of the repository.

Please could you provide a new solution for installing dmlab2d from source.

Indeed, it looks like we don't provide instructions for building the wheel. Part of this is because I haven't uploaded the latest version of the readme yet, but we're also missing the instructions to build from source. @charlesbeattie, @jagapiou would you care to update our README (and I'll push the new version)?

As for the breakage, we recently changed the default build to use LuaJit instead of Lua 5.1. You can change that back by passing --lua_version=lua5_1 to the bazel build command. Alternatively, you could install LuaJit on your build machine.

Currently we have (pending) in the README:

`dmlab2d` is distributed as pre-built wheels for Linux and macOS. If there is no
appropriate wheel for your platform, you will need to build it from source. See
[`install.sh`](install.sh) for an example installation script that can be
adapted to your setup.

install.sh should also become public on the next copybara push.

I think that will suffice? Written instructions on how to install will basically just replicate install.sh.

Would it also be possible to use dmlab2d on Windows by building an appropriate wheel?

@dimonenka: that's entirely untested, though in principle all the third-party libraries look like they should be pretty portable. I expect you'll have to tweak a few things, but it's worth giving it a try. You'll need a Windows build of bazel to get started.

The install.sh script is now available, I think this issue is now resolved?