diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5246076d78..e1f57f667c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -261,7 +261,7 @@ jobs: docker_metaworld: runs-on: ubuntu-latest needs: docker_base - # if: "contains(github.event.head_commit.message, 'enable docker')" + if: "contains(github.event.head_commit.message, 'metaworld docker')" strategy: matrix: platform: [linux/amd64] @@ -386,3 +386,26 @@ jobs: run: | docker buildx build -f ./docker/Dockerfile.env . -t opendilab/ding:nightly-dmc2gym --target=dmc2gym docker push opendilab/ding:nightly-dmc2gym + + docker_evogym: + runs-on: ubuntu-latest + needs: docker_base + if: "contains(github.event.head_commit.message, 'evogym docker')" + strategy: + matrix: + platform: [linux/amd64] + # python-version: [3.6, 3.7, 3.8] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERIO_USERNAME }} + password: ${{ secrets.DOCKERIO_PASSWORD }} + + - name: Build and push + id: docker_build + run: | + docker buildx build -f ./docker/Dockerfile.env . -t opendilab/ding:nightly-evogym --target=evogym + docker push opendilab/ding:nightly-evogym diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 0aca89b2fb..07550d49f9 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -3,7 +3,7 @@ FROM pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime as base WORKDIR /ding RUN apt update \ - && apt install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev swig curl git vim gcc \g++ make wget locales dnsutils zip unzip -y \ + && apt install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev swig curl git vim gcc \g++ make wget locales dnsutils zip unzip cmake -y \ && apt clean \ && rm -rf /var/cache/apt/* \ && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ @@ -33,7 +33,7 @@ RUN apt-get update && \ python3.8 python3-pip python3.8-dev RUN apt update \ - && apt install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev swig curl git vim gcc \g++ make wget locales dnsutils zip unzip -y \ + && apt install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev swig curl git vim gcc \g++ make wget locales dnsutils zip unzip cmake -y \ && apt clean \ && rm -rf /var/cache/apt/* \ && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index 9ab6f5fd31..1f446ae985 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -59,7 +59,7 @@ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /ding -RUN apt-get update && apt-get install git cmake build-essential libgl1-mesa-dev libsdl2-dev \ +RUN apt-get update && apt-get install git build-essential libgl1-mesa-dev libsdl2-dev \ libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev libboost-all-dev \ libdirectfb-dev libst-dev mesa-utils xvfb x11vnc -y \ && apt clean \ @@ -102,8 +102,7 @@ WORKDIR /ding RUN apt update \ && apt install -y \ - build-essential \ - cmake + build-essential RUN mkdir -p /root/.cityflow \ && cd /root/.cityflow \ @@ -117,3 +116,18 @@ RUN mkdir -p /root/.smartcross \ && cd DI-smartcross \ && pip install -e . + +FROM opendilab/ding:nightly as evogym + +WORKDIR /ding + +RUN apt update \ + && apt install -y \ + build-essential libglew-dev libglu1-mesa-dev xorg-dev + +RUN mkdir -p /root/.evogym \ + && cd /root/.evogym \ + && git clone --recurse-submodules https://github.com/PaParaZz1/evogym.git \ + && pip3 install -r requirements.txt + +RUN cd /root/.evogym/evogym && python3 setup.py install