Skip to content

Commit

Permalink
feature(nyz): setup evogym docker
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Feb 12, 2023
1 parent e30bcc0 commit c117c91
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
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
20 changes: 17 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,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

0 comments on commit c117c91

Please sign in to comment.