Open jugheadjones10 opened 1 week ago
Have tried a lot a lot of things but I just can't seem to get ale-py to install properly in Docker
What is the install error?
@pseudo-rnd-thoughts 6.062 ERROR: Failed building wheel for ale-py 6.063 Failed to build ale-py 6.154 ERROR: Could not build wheels for ale-py which use PEP 517 and cannot be installed directly
Another error I often see when trying out different base images and Docker configurations:
4.666 RuntimeError 4.666 4.666 Unable to find installation candidates for ale-py (0.8.1)
Ok after a ton of trial and error I found these very specific conditions under which it will work:
# Use the official Python image with a compatible version
FROM python:3.9-slim
# Set environment variables to prevent prompts during package installations
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies, including SDL2 development libraries
RUN apt-get update && \
apt-get -y install \
python3-pip \
xvfb \
ffmpeg \
git \
build-essential \
cmake \
zlib1g-dev \
libbz2-dev \
libpng-dev \
libopencv-dev \
libsdl2-dev
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip install poetry --upgrade
COPY pyproject.toml pyproject.toml
COPY poetry.lock poetry.lock
RUN poetry install
(ale-py 0.10.1 is listed as a dependency in pyproject.toml)
Building the above gives this error: 3.350 ERROR: Failed building wheel for ale-py 3.350 Failed to build ale-py 3.366 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (ale-py)
I've tried many python versions and ale-versions, to no avail.