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

feature(nyz): setup evogym docker #580

Merged
merged 2 commits into from
Feb 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
21 changes: 18 additions & 3 deletions docker/Dockerfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand All @@ -117,3 +116,19 @@ 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 \
&& cd evogym \
&& pip3 install -r requirements.txt

RUN cd /root/.evogym/evogym && python3 setup.py install