DeepMind Lab with Bazel 8, Python 3.13, and Gymnasium/Shimmy support
Project description
dmlab-gym
A fork of DeepMind Lab updated for Bazel 8, Python 3.13, and wrapped with Gymnasium via Shimmy.
What This Is
DeepMind Lab is a 3D learning environment based on id Software's Quake III Arena. This fork modernizes the build toolchain so it compiles and runs on current systems:
- Bazel 8 with
--enable_workspacecompatibility - Python 3.13 C extension and package support
- Gymnasium/Shimmy wrapper for standard RL interfaces
The engine builds inside a container (Podman or Docker). The resulting wheel installs into a host-side uv environment.
Platform Support
| Platform | Status |
|---|---|
| Linux (x86_64) | Supported |
| macOS | Not supported |
| Windows | Not supported |
Prerequisites
- uv (Python environment management)
- Podman or Docker (container builds)
- Python 3.13+
- OSMesa (runtime dependency for headless rendering) — installed automatically by
dmlab-gym buildif missing
Manual OSMesa install
| Distribution | Command |
|---|---|
| Fedora / RHEL | sudo dnf install mesa-libOSMesa or mesa-compat-libOSMesa |
| Bluefin / immutable | sudo dnf install --transient mesa-compat-libOSMesa (resets on reboot) |
| Ubuntu / Debian | sudo apt install libosmesa6 |
| Arch | sudo pacman -S mesa |
Installation
pip install dmlab-gym
Building the Native Extension
After installing, build the DeepMind Lab native extension:
Quick Start
dmlab-gym build # build and install deepmind-lab
dmlab-gym build -o ~/my_output # custom output directory
dmlab-gym build --no-install # build only, skip install
This auto-detects Podman or Docker, builds the native extension inside a container, and installs the resulting wheel into your current environment.
Verify
python -c "import deepmind_lab; print('OK')"
Manual Build
If you prefer to run the steps yourself:
Podman:
podman build -t dmlab-builder -f Dockerfile.build .
mkdir -p /tmp/dmlab_pkg
podman run --rm \
-v ./:/build/lab:Z \
-v /tmp/dmlab_pkg:/output:Z \
dmlab-builder \
bash -c "
bazel build -c opt //python/pip_package:build_pip_package \
--define headless=osmesa && \
./bazel-bin/python/pip_package/build_pip_package /output
"
Docker:
docker build -t dmlab-builder -f Dockerfile.build .
mkdir -p /tmp/dmlab_pkg
docker run --rm \
-v ./:/build/lab \
-v /tmp/dmlab_pkg:/output \
dmlab-builder \
bash -c "
bazel build -c opt //python/pip_package:build_pip_package \
--define headless=osmesa && \
./bazel-bin/python/pip_package/build_pip_package /output
"
Project Structure
| Directory | Description |
|---|---|
engine/ |
ioquake3 game engine (GPLv2) |
q3map2/ |
Map compilation tools (GPLv2) |
assets/ |
DeepMind Lab assets (CC BY 4.0) |
assets_oa/ |
Open Arena assets (GPLv2) |
game_scripts/ |
Lua game/level scripts |
python/ |
Python C extension and pip package |
deepmind/ |
Core DeepMind Lab code |
public/ |
Public API headers |
third_party/ |
Vendored dependencies |
dmlab_gym/ |
Python package (CLI, utilities) |
bazel/ |
Bazel build configuration |
testing/ |
Test utilities |
examples/ |
Example agent code |
License
This project is a derivative work of DeepMind Lab and is distributed under the same licenses:
- GPLv2 --
engine/,q3map2/,assets_oa/ - CC BY 4.0 --
assets/ - Custom academic license --
engine/code/tools/lcc/ - BSD 3-Clause --
q3map2/libs/{ddslib,picomodel}
See LICENSE for full details.
Attribution
Based on DeepMind Lab by DeepMind.
If you use DeepMind Lab in your research, please cite the DeepMind Lab paper.
Upstream Sources
DeepMind Lab is built from the following open source projects:
- ioquake3 -- game engine
- bspc -- bot route compilation
- GtkRadiant / q3map2 -- map compilation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmlab_gym-0.1.1.tar.gz.
File metadata
- Download URL: dmlab_gym-0.1.1.tar.gz
- Upload date:
- Size: 47.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77700af81b7dba0e49a83f17055edf86d3a3096479198967e9defe670084e6b1
|
|
| MD5 |
f46b6b113c787f0265f5ee1a3b3d2d2e
|
|
| BLAKE2b-256 |
a4746c28e34586bdbb74115b94076c082bfa156027953ec760c16bf69e73a339
|
File details
Details for the file dmlab_gym-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dmlab_gym-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d66d5996cfbbc24bc495957175943cb06cf1fe751c70dadc7ede46a68814eeba
|
|
| MD5 |
d87b92213e4edb29f726021c7e4b97e3
|
|
| BLAKE2b-256 |
41ed457813eab2effcb1d3c8b2d3c72afed800e0964dc82f99261eea25b574d5
|