-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ci from private cloud to docker (#228)
- Loading branch information
1 parent
494a409
commit 1f1c12f
Showing
19 changed files
with
193 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
FROM ubuntu:20.04 | ||
# Need docker >= 20.10.9, see https://stackoverflow.com/questions/71941032/why-i-cannot-run-apt-update-inside-a-fresh-ubuntu22-04 | ||
|
||
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG HOME=/root | ||
ARG PATH=$PATH:$HOME/go/bin | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y python3-pip python3-dev golang-1.16 clang-format-11 git wget swig \ | ||
&& apt-get install -y python3-pip python3-dev golang-1.18 clang-format-11 git wget swig tmux clang-tidy \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
RUN ln -sf /usr/lib/go-1.16/bin/go /usr/bin/go | ||
RUN ln -sf /usr/lib/go-1.18/bin/go /usr/bin/go | ||
RUN go env -w GOPROXY=https://goproxy.cn | ||
|
||
RUN wget https://mirrors.huaweicloud.com/bazel/5.1.1/bazel-5.1.1-linux-x86_64 | ||
RUN chmod +x bazel-5.1.1-linux-x86_64 | ||
RUN wget https://mirrors.huaweicloud.com/bazel/6.0.0/bazel-6.0.0-linux-x86_64 | ||
RUN chmod +x bazel-6.0.0-linux-x86_64 | ||
RUN mkdir -p $HOME/go/bin | ||
RUN mv bazel-5.1.1-linux-x86_64 $HOME/go/bin/bazel | ||
RUN mv bazel-6.0.0-linux-x86_64 $HOME/go/bin/bazel | ||
RUN go install github.com/bazelbuild/buildtools/buildifier@latest | ||
RUN pip3 install --upgrade pip isort yapf cpplint flake8 flake8_bugbear mypy && rm -rf ~/.pip/cache | ||
RUN $HOME/go/bin/bazel version | ||
|
||
RUN useradd -ms /bin/bash github-action | ||
|
||
WORKDIR /app | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
FROM ubuntu:20.04 | ||
# Need docker >= 20.10.9, see https://stackoverflow.com/questions/71941032/why-i-cannot-run-apt-update-inside-a-fresh-ubuntu22-04 | ||
|
||
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG HOME=/root | ||
ARG PATH=$PATH:$HOME/go/bin | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y python3-pip python3-dev golang-1.16 clang-format-11 git wget swig \ | ||
&& apt-get install -y python3-pip python3-dev golang-1.18 clang-format-11 git wget swig tmux clang-tidy \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
RUN ln -sf /usr/lib/go-1.16/bin/go /usr/bin/go | ||
RUN ln -sf /usr/lib/go-1.18/bin/go /usr/bin/go | ||
|
||
RUN go install github.com/bazelbuild/bazelisk@latest && ln -sf $HOME/go/bin/bazelisk $HOME/go/bin/bazel | ||
RUN go install github.com/bazelbuild/buildtools/buildifier@latest | ||
RUN pip3 install --upgrade pip isort yapf cpplint flake8 flake8_bugbear mypy && rm -rf ~/.pip/cache | ||
RUN $HOME/go/bin/bazel version | ||
|
||
RUN useradd -ms /bin/bash github-action | ||
|
||
WORKDIR /app | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,64 @@ | ||
FROM ubuntu:16.04 | ||
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu16.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG HOME=/root | ||
ENV PATH=$HOME/go/bin:$PATH | ||
ENV PATH=$HOME/go/bin:$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH | ||
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
WORKDIR $HOME | ||
|
||
# install base dependencies | ||
|
||
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:ubuntu-toolchain-r/test && add-apt-repository ppa:deadsnakes/ppa | ||
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:ubuntu-toolchain-r/test | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y git curl wget gcc-9 g++-9 build-essential patchelf make libssl-dev zlib1g-dev \ | ||
libbz2-dev libreadline-dev libsqlite3-dev llvm \ | ||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev swig \ | ||
python3.7 python3.8 python3.9 python3.10 \ | ||
python3.7-dev python3.8-dev python3.9-dev python3.10-dev \ | ||
python3.8-distutils python3.9-distutils python3.10-distutils | ||
RUN ln -sf /usr/bin/python3 /usr/bin/python | ||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
&& apt-get install -y git curl wget gcc-9 g++-9 build-essential swig make \ | ||
zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev libffi-dev liblzma-dev \ | ||
llvm xz-utils tk-dev libxml2-dev libxmlsec1-dev | ||
# use self-compiled openssl instead of system provided (1.0.2) | ||
RUN apt-get remove -y libssl-dev | ||
|
||
# install pip | ||
RUN curl https://pyenv.run | sh | ||
|
||
RUN wget https://bootstrap.pypa.io/get-pip.py | ||
RUN for i in 7 8 9 10; do ln -sf /usr/bin/python3.$i /usr/bin/python3; python3 get-pip.py; done | ||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
|
||
# install go from source | ||
|
||
RUN wget https://golang.org/dl/go1.17.3.linux-amd64.tar.gz | ||
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz | ||
RUN wget https://golang.org/dl/go1.19.4.linux-amd64.tar.gz | ||
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz | ||
RUN ln -sf /usr/local/go/bin/go /usr/bin/go | ||
|
||
# install bazel | ||
|
||
RUN go install github.com/bazelbuild/bazelisk@latest && ln -sf $HOME/go/bin/bazelisk $HOME/go/bin/bazel | ||
|
||
# install big wheels | ||
RUN bazel version | ||
|
||
# install newest openssl (for py3.10 and py3.11) | ||
|
||
RUN for i in 7 8 9 10; do ln -sf /usr/bin/python3.$i /usr/bin/python3; pip3 install torch opencv-python-headless; done | ||
RUN wget https://www.openssl.org/source/openssl-1.1.1s.tar.gz | ||
RUN tar xf openssl-1.1.1s.tar.gz | ||
WORKDIR $HOME/openssl-1.1.1s | ||
RUN ./config | ||
RUN make -j | ||
RUN make install | ||
|
||
RUN bazel version | ||
# install python | ||
|
||
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> /etc/profile | ||
RUN echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> /etc/profile | ||
RUN echo 'eval "$(pyenv init -)"' >> /etc/profile | ||
|
||
RUN LDFLAGS="-Wl,-rpath,/root/openssl-1.1.1s/lib" CONFIGURE_OPTS="-with-openssl=/root/openssl-1.1.1s" pyenv install -v 3.11-dev | ||
RUN LDFLAGS="-Wl,-rpath,/root/openssl-1.1.1s/lib" CONFIGURE_OPTS="-with-openssl=/root/openssl-1.1.1s" pyenv install -v 3.10-dev | ||
RUN LDFLAGS="-Wl,-rpath,/root/openssl-1.1.1s/lib" CONFIGURE_OPTS="-with-openssl=/root/openssl-1.1.1s" pyenv install -v 3.9-dev | ||
RUN LDFLAGS="-Wl,-rpath,/root/openssl-1.1.1s/lib" CONFIGURE_OPTS="-with-openssl=/root/openssl-1.1.1s" pyenv install -v 3.8-dev | ||
RUN LDFLAGS="-Wl,-rpath,/root/openssl-1.1.1s/lib" CONFIGURE_OPTS="-with-openssl=/root/openssl-1.1.1s" pyenv install -v 3.7-dev | ||
|
||
WORKDIR /app | ||
WORKDIR /__w/envpool/envpool | ||
COPY . . | ||
|
||
# compile and test release wheels | ||
# cache bazel build (cpp only) | ||
|
||
RUN for i in 7 8 9 10; do ln -sf /usr/bin/python3.$i /usr/bin/python3; make pypi-wheel BAZELOPT="--remote_cache=http://bazel-cache.sail:8080"; pip3 install wheelhouse/*cp3$i*.whl; rm dist/*.whl; make release-test; done | ||
RUN bazel build //envpool/utils:image_process_test --config=release | ||
RUN bazel build //envpool/vizdoom/bin:vizdoom_bin --config=release |
Oops, something went wrong.