Arcade-Learning-Environment icon indicating copy to clipboard operation
Arcade-Learning-Environment copied to clipboard

Support for Linux ARM64

Open XavierGeerinck opened this issue 2 years ago • 5 comments

Hi All!

Thank you for this amazing project. I am just wondering, is Linux ARM64 supported? I am trying to compile and install it myself with the below, but it appears that the ROMs are not found then:

# Install dependencies for building ALE
RUN apt update && \
    apt install -y python3 python3-pip git cmake libsdl2-dev libboost-all-dev

# Clone the ale-py repository
RUN git clone https://github.com/mgbellemare/Arcade-Learning-Environment.git /ale

RUN cd ale \
    && pip install . \
    && python setup.py bdist_wheel

Which results in when starting a program

/usr/local/lib/python3.8/site-packages/gymnasium/envs/registration.py:604: UserWarning: WARN: plugin: shimmy.registration:register_gymnasium_envs raised Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gymnasium/envs/registration.py", line 602, in load_plugin_envs
    fn()
  File "/usr/local/lib/python3.8/site-packages/shimmy/registration.py", line 263, in register_gymnasium_envs
    _register_atari_envs()
  File "/usr/local/lib/python3.8/site-packages/shimmy/registration.py", line 207, in _register_atari_envs
    _register_atari_configs(
  File "/usr/local/lib/python3.8/site-packages/shimmy/registration.py", line 131, in _register_atari_configs
    from ale_py.roms import utils as rom_utils
ModuleNotFoundError: No module named 'ale_py.roms'

XavierGeerinck avatar Apr 14 '23 16:04 XavierGeerinck

Hi @XavierGeerinck,

There shouldn't be a problem with ARM64. We already publish ARM wheels for macOS.

Are you sure there's not a local directory named ale_py? Can you try to install via pip with verbose mode enabled, i.e., pip install . --verbose, and post the logs here?

Also, if you can post the exact Dockerfile that's able to reproduce the bug, I could also take a look at that.

JesseFarebro avatar Apr 18 '23 03:04 JesseFarebro

Hi! Thanks a lot for coming back so soon. I got it working eventually with the below

# Install dependencies for building ALE
RUN apt update && \
    apt install -y python3 python3-pip git cmake libsdl2-dev libboost-all-dev

# Clone the ale-py repository
RUN git clone https://github.com/mgbellemare/Arcade-Learning-Environment.git /ale

# Build ale-py and package it as wheel
RUN mkdir /tmp/ale-build \
    && cd /tmp/ale-build \
    && cmake -DUSE_SDL=OFF -DUSE_RLGLUE=OFF -DBUILD_EXAMPLES=OFF /ale \
    && make \
    && cd /ale \
    && pip install .

XavierGeerinck avatar Apr 18 '23 08:04 XavierGeerinck

As ARM data center processors are becoming ever more popular I plan on releasing prebuilt wheels for manylinux_aarch64 next release.

JesseFarebro avatar Jun 01 '23 17:06 JesseFarebro

A manylinux_aarch64 release would help with linux containers on mac too...

andywatts avatar Jun 08 '24 21:06 andywatts

@andywatts would you be able to make a PR for this? It should be necessary to just update the GitHub/actions/build script for generating wheels

pseudo-rnd-thoughts avatar Jun 09 '24 18:06 pseudo-rnd-thoughts