Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ale-py installation issue in Docker image #574

Open
jugheadjones10 opened this issue Nov 9, 2024 · 5 comments
Open

ale-py installation issue in Docker image #574

jugheadjones10 opened this issue Nov 9, 2024 · 5 comments

Comments

@jugheadjones10
Copy link

jugheadjones10 commented Nov 9, 2024

FROM python:3.10

ENV DEBIAN_FRONTEND=noninteractive 
RUN apt-get update && \
    apt-get -y install python3-pip
RUN ln -s /usr/bin/python3 /usr/bin/python

ARG CACHE_BUST=$(date +%s)
RUN echo "$CACHE_BUST" && python --version


RUN pip install --upgrade pip setuptools wheel

RUN pip install ale-py

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.

@jugheadjones10
Copy link
Author

Have tried a lot a lot of things but I just can't seem to get ale-py to install properly in Docker

@pseudo-rnd-thoughts
Copy link
Member

What is the install error?

@jugheadjones10
Copy link
Author

@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

@jugheadjones10
Copy link
Author

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)

@jugheadjones10
Copy link
Author

jugheadjones10 commented Nov 10, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants