未验证 提交 efa21b12 编写于 作者: P pangyoki 提交者: GitHub

[dockerfile] add cuda11.6、cuda11.5、cuda11.4、cuda11.3 manylinux docker (#41251)

* add cuda11.5 manylinux docker

* build.sh

* fix

* fix

* support cu113 and cu114

* add --no-check-certificate when wget sqlite-autoconf-3250300

* change cuda11.4.2 to cuda11.4.3

* add cu116
上级 bed9aaea
...@@ -65,7 +65,7 @@ RUN LD_LIBRARY_PATH=/opt/_internal/cpython-3.6.0/lib/:${LD_LIBRARY_PATH} /opt/_i ...@@ -65,7 +65,7 @@ RUN LD_LIBRARY_PATH=/opt/_internal/cpython-3.6.0/lib/:${LD_LIBRARY_PATH} /opt/_i
LD_LIBRARY_PATH=/opt/_internal/cpython-3.8.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.8.0/bin/pip3 install pre-commit 'ipython==5.3.0' && \ LD_LIBRARY_PATH=/opt/_internal/cpython-3.8.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.8.0/bin/pip3 install pre-commit 'ipython==5.3.0' && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.9.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.9.0/bin/pip3 install pre-commit 'ipython==5.3.0' LD_LIBRARY_PATH=/opt/_internal/cpython-3.9.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.9.0/bin/pip3 install pre-commit 'ipython==5.3.0'
RUN wget -O /opt/swig-2.0.12.tar.gz https://sourceforge.net/projects/swig/files/swig/swig-2.0.12/swig-2.0.12.tar.gz/download && \ RUN wget -O /opt/swig-2.0.12.tar.gz --no-check-certificate https://sourceforge.net/projects/swig/files/swig/swig-2.0.12/swig-2.0.12.tar.gz/download && \
cd /opt && tar xzf swig-2.0.12.tar.gz && cd /opt/swig-2.0.12 && ./configure && make && make install && cd /opt && rm swig-2.0.12.tar.gz cd /opt && tar xzf swig-2.0.12.tar.gz && cd /opt/swig-2.0.12 && ./configure && make && make install && cd /opt && rm swig-2.0.12.tar.gz
# ccache 3.7.9 # ccache 3.7.9
......
...@@ -149,7 +149,7 @@ LD_LIBRARY_PATH="${ORIGINAL_LD_LIBRARY_PATH}" ...@@ -149,7 +149,7 @@ LD_LIBRARY_PATH="${ORIGINAL_LD_LIBRARY_PATH}"
# According to ar issues: https://lists.gnu.org/archive/html/bug-binutils/2016-05/msg00211.html # According to ar issues: https://lists.gnu.org/archive/html/bug-binutils/2016-05/msg00211.html
# we should install new version ar with 64-bit supported here # we should install new version ar with 64-bit supported here
wget https://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.gz wget --no-check-certificate https://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.gz
tar xzf binutils-2.27.tar.gz && cd binutils-2.27 tar xzf binutils-2.27.tar.gz && cd binutils-2.27
./configure --prefix=/opt/rh/devtoolset-2/root/usr/ --enable-64-bit-archive && make -j `nproc` && make install ./configure --prefix=/opt/rh/devtoolset-2/root/usr/ --enable-64-bit-archive && make -j `nproc` && make install
cd .. && rm binutils-2.27.tar.gz && rm -rf binutils-2.27 cd .. && rm binutils-2.27.tar.gz && rm -rf binutils-2.27
...@@ -66,7 +66,7 @@ function do_cpython_build { ...@@ -66,7 +66,7 @@ function do_cpython_build {
# -Wformat added for https://bugs.python.org/issue17547 on Python 2.6 # -Wformat added for https://bugs.python.org/issue17547 on Python 2.6
if [ $(lex_pyver $py_ver) -ge $(lex_pyver 3.6) ]; then if [ $(lex_pyver $py_ver) -ge $(lex_pyver 3.6) ]; then
wget -q https://www.sqlite.org/2018/sqlite-autoconf-3250300.tar.gz wget -q --no-check-certificate https://www.sqlite.org/2018/sqlite-autoconf-3250300.tar.gz
tar -zxf sqlite-autoconf-3250300.tar.gz tar -zxf sqlite-autoconf-3250300.tar.gz
cd sqlite-autoconf-3250300 cd sqlite-autoconf-3250300
./configure --prefix=/usr/local ./configure --prefix=/usr/local
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
VERSION=$(nvcc --version | grep release | grep -oEi "release ([0-9]+)\.([0-9])"| sed "s/release //") VERSION=$(nvcc --version | grep release | grep -oEi "release ([0-9]+)\.([0-9])"| sed "s/release //")
if [ "$VERSION" == "10.0" ]; then if [ "$VERSION" == "10.0" ]; then
DEB="nccl-repo-ubuntu1604-2.4.7-ga-cuda10.0_1-1_amd64.deb" DEB="nccl-repo-ubuntu1604-2.4.7-ga-cuda10.0_1-1_amd64.deb"
elif [ "$VERSION" == "10.2" ] || [ "$VERSION" == "10.1" ] || [ "$VERSION" == "11.0" ] || [ "$VERSION" == "11.2" ]; then elif [ "$VERSION" == "10.2" ] || [ "$VERSION" == "10.1" ] || [ "$VERSION" == "11.0" ] || [ "$VERSION" == "11.2" ] || [ "$VERSION" == "11.3" ] || [ "$VERSION" == "11.4" ] || [ "$VERSION" == "11.5" ] || [ "$VERSION" == "11.6" ]; then
if [ -f "/etc/redhat-release" ];then if [ -f "/etc/redhat-release" ];then
rm -f /usr/local/lib/libnccl.so rm -f /usr/local/lib/libnccl.so
wget --no-check-certificate -q https://nccl2-deb.cdn.bcebos.com/libnccl-2.7.8-1+cuda10.2.x86_64.rpm wget --no-check-certificate -q https://nccl2-deb.cdn.bcebos.com/libnccl-2.7.8-1+cuda10.2.x86_64.rpm
......
...@@ -100,6 +100,26 @@ function make_cuda112cudnn821trt8034gcc54() { ...@@ -100,6 +100,26 @@ function make_cuda112cudnn821trt8034gcc54() {
sed -i '/CMD/iRUN ldconfig' Dockerfile.tmp sed -i '/CMD/iRUN ldconfig' Dockerfile.tmp
} }
function make_cuda113cudnn8() {
sed 's/<baseimg>/11.3.1-cudnn8-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-8.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
}
function make_cuda114cudnn8() {
sed 's/<baseimg>/11.4.3-cudnn8-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-8.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
}
function make_cuda115cudnn8() {
sed 's/<baseimg>/11.5.1-cudnn8-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-8.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
}
function make_cuda116cudnn8() {
sed 's/<baseimg>/11.6.2-cudnn8-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-8.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
}
function main() { function main() {
local CMD=$1 local CMD=$1
case $CMD in case $CMD in
...@@ -145,6 +165,18 @@ function main() { ...@@ -145,6 +165,18 @@ function main() {
cuda112cudnn821trt8034gcc54) cuda112cudnn821trt8034gcc54)
make_cuda112cudnn821trt8034gcc54 make_cuda112cudnn821trt8034gcc54
;; ;;
cuda113cudnn8)
make_cuda113cudnn8
;;
cuda114cudnn8)
make_cuda114cudnn8
;;
cuda115cudnn8)
make_cuda115cudnn8
;;
cuda116cudnn8)
make_cuda116cudnn8
;;
*) *)
echo "Make dockerfile error, Without this paramet." echo "Make dockerfile error, Without this paramet."
exit 1 exit 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册