Skip to content

Commit

Permalink
feature(wgt): add torch-rpc fix dockerfile (#628)
Browse files Browse the repository at this point in the history
* feature(wgt): add torch-rpc dockerfile

* feature(wgt): add torch-rpc fix dockerfile and add new rpc deploy CI-action

* test_ci

* Add the rpc image build logic to deploy.yml

* add pull_request action for docker branch

* add ci skip

* fix: test env in ci action yml[test rpc]
  • Loading branch information
SolenoidWGT authored Apr 1, 2023
1 parent e873d9e commit 23775e9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions docker/Dockerfile.rpc
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 23775e9

Please sign in to comment.