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(wgt): add torch-rpc fix dockerfile #628

Merged
merged 10 commits into from
Apr 1, 2023
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]