diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 04bcc3b3b1..17789d7730 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,8 @@ name: deploy # deploy docker on: push: branches: [main, '*deploy*', '*docker*'] - + pull_request: + branches: [main, '*docker*'] jobs: docker_base: runs-on: ubuntu-latest @@ -387,6 +388,29 @@ jobs: docker buildx build -f ./docker/Dockerfile.env . -t opendilab/ding:nightly-dmc2gym --target=dmc2gym docker push opendilab/ding:nightly-dmc2gym + docker_rpc: + runs-on: ubuntu-latest + needs: docker_base + if: "contains(github.event.head_commit.message, 'test rpc')" + 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.rpc . -t opendilab/ding:nightly-rpc-base --target=base + docker push opendilab/ding:nightly-rpc-base + docker_evogym: runs-on: ubuntu-latest needs: docker_base diff --git a/docker/Dockerfile.rpc b/docker/Dockerfile.rpc new file mode 100644 index 0000000000..b9e9496548 --- /dev/null +++ b/docker/Dockerfile.rpc @@ -0,0 +1,23 @@ +FROM snsao/pytorch:tensorpipe-fix 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 -y \ + && apt clean \ + && rm -rf /var/cache/apt/* \ + && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ + && locale-gen + +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:UTF-8 +ENV LC_ALL en_US.UTF-8 + +ADD setup.py setup.py +ADD dizoo dizoo +ADD ding ding +ADD README.md README.md + +RUN python3 -m pip install --upgrade pip \ + && python3 -m pip install --ignore-installed 'PyYAML<6.0' \ + && python3 -m pip install --no-cache-dir .[fast,test]