From 5939a9a3d9d7479c3e7b14c8f5399ca71efb64d1 Mon Sep 17 00:00:00 2001 From: qili93 Date: Wed, 3 Jul 2024 12:20:37 +0800 Subject: [PATCH 1/2] [DCU][XPU] add develop dockerfile for dcu and xpu --- tools/dockerfile/Dockerfile.develop.dtk | 108 +++++++++++++++++ tools/dockerfile/Dockerfile.develop.xre | 113 +++++++++++++++++ tools/dockerfile/Dockerfile.rocm | 153 ------------------------ 3 files changed, 221 insertions(+), 153 deletions(-) create mode 100644 tools/dockerfile/Dockerfile.develop.dtk create mode 100644 tools/dockerfile/Dockerfile.develop.xre delete mode 100644 tools/dockerfile/Dockerfile.rocm diff --git a/tools/dockerfile/Dockerfile.develop.dtk b/tools/dockerfile/Dockerfile.develop.dtk new file mode 100644 index 00000000000000..117e61abad8b8e --- /dev/null +++ b/tools/dockerfile/Dockerfile.develop.dtk @@ -0,0 +1,108 @@ +# Docker Image for PaddlePaddle Hygon DCU2 + +FROM sugonhub/kylin:v10-dev +LABEL maintainer="PaddlePaddle Authors " + +RUN yum install -y bzip2-devel openssh-server elfutils-devel diffutils libtool iproute \ + blas-devel lapack-devel make git patch unzip bison hostname yasm libsndfile-devel \ + automake which file net-tools zlib-devel libffi-devel vim tk-devel tkinter rpm-build \ + sqlite-devel xz-devel wget curl-devel initscripts mesa-libGL numactl-devel pcre-devel \ + openssl-devel libjpeg-turbo-devel libpng-devel ninja-build pciutils libzstd-devel \ + gcc gcc-c++ gcc-gfortran + +# workdir +WORKDIR /opt + +# cmake 3.27.7 +RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \ + chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \ + ./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \ + rm -rf cmake-3.27.7-linux-x86_64.sh && rm -rf /opt/cmake +RUN rm -rf /usr/bin/cmake /usr/bin/cmake3 && \ + ln -s /opt/cmake-3.27.7/bin/cmake /usr/bin/cmake && + ln -s /opt/cmake-3.27.7/bin/cmake /usr/bin/cmake3 +ENV PATH=/opt/cmake-3.27.7/bin:${PATH} + +# Python 3.10.14 +RUN wget -q https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz && \ + tar xzf Python-3.10.14.tgz && cd Python-3.10.14 && \ + CFLAGS="-Wformat" ./configure --prefix=/usr/local/ --enable-shared > /dev/null && \ + make -j16 > /dev/null && make altinstall > /dev/null && ldconfig && \ + cd ../ && rm -rf Python-3.10.14 && rm -rf Python-3.10.14.tgz +ENV LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} +ENV CPLUS_INCLUDE_PATH=/usr/local/include/python3.10:${CPLUS_INCLUDE_PATH} + +# create venv and activate +RUN /usr/local/bin/python3.10 -m venv /opt/py310 +# update env +ENV PATH=/opt/py310/bin:$PATH +RUN echo "source /opt/py310/bin/activate" >> /root/.bashrc +# upgrade pip +RUN pip install --upgrade pip setuptools wheel + +# install pylint and pre-commit +RUN pip install pre-commit==2.17.0 pylint pytest astroid isort coverage qtconsole distro +RUN pip install attrs pyyaml pathlib2 scipy requests psutil Cython clang-format==13.0.0 PyGithub + +# install Paddle requirement +RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/requirements.txt -O requirements.txt && \ + pip install -r requirements.txt && rm -rf requirements.txt +RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/unittest_py/requirements.txt -O requirements.txt && \ + pip install -r requirements.txt && rm -rf requirements.txt + +# git credential to skip password typing +RUN git config --global credential.helper store && \ + git config --global pull.rebase false + +# Fix locales to en_US.UTF-8 +RUN yum -y install glibc-locale-source glibc-langpack-en +RUN localedef -i en_US -f UTF-8 en_US.UTF-8 + +# patchelf 0.14.5 - https://github.com/NixOS/patchelf/pull/216 +RUN wget -q https://github.com/NixOS/patchelf/archive/refs/tags/0.14.5.tar.gz && \ + tar xzf 0.14.5.tar.gz && cd patchelf-0.14.5 && \ + ./bootstrap.sh > /dev/null && ./configure > /dev/null && \ + make -j16 > /dev/null && make install > /dev/null && \ + cd .. && rm -rf patchelf-0.14.5 && rm -rf 0.14.5.tar.gz + +# ccache 4.6.3 +RUN wget -q https://github.com/ccache/ccache/releases/download/v4.6.3/ccache-4.6.3.tar.gz && \ + tar xf ccache-4.6.3.tar.gz && mkdir /usr/local/ccache-4.6.3 && cd ccache-4.6.3 && \ + mkdir build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=Release -DREDIS_STORAGE_BACKEND=OFF \ + -DCMAKE_INSTALL_PREFIX=/usr/local/ccache-4.6.3 .. > /dev/null && \ + make -j16 > /dev/null && make install > /dev/null && \ + cd ../../ && rm -rf ccache-4.6.3.tar.gz && rm -rf ccache-4.6.3 && \ + ln -s /usr/local/ccache-4.6.3/bin/ccache /usr/local/bin/ccache +ENV CCACHE_MAXSIZE=50G \ + CCACHE_LIMIT_MULTIPLE=0.8 \ + CCACHE_SLOPPINESS=clang_index_store,time_macros,include_file_mtime + +# configure ssh +RUN sed -i "s/^#PermitRootLogin/PermitRootLogin/" /etc/ssh/sshd_config && \ + sed -i "s/^#PubkeyAuthentication/PubkeyAuthentication/" /etc/ssh/sshd_config && \ + sed -i "s/^#RSAAuthentication/RSAAuthentication/" /etc/ssh/sshd_config && \ + sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config +RUN ssh-keygen -A + +# yum clean +RUN yum clean all && \ + rm -rf /var/cache/yum && \ + rm -rf /var/lib/yum/yumdb && \ + rm -rf /var/lib/yum/history + +# Install DTK +RUN wget -q https://cancon.hpccube.com:65024/file/1/DTK-24.04.1/CentOS7.6/DTK-24.04.1-CentOS7.6-x86_64.tar.gz && \ + tar zxf DTK-24.04.1-CentOS7.6-x86_64.tar.gz && rm -rf DTK-24.04.1-CentOS7.6-x86_64.tar.gz +# Replace if you use other device type: Z100, Z100L, K100, e.g. +RUN wget -q https://paddle-device.bj.bcebos.com/dcu/hyhal-K100AI.tar.gz && \ + tar zxf hyhal-K100AI.tar.gz && rm -rf hyhal-K100AI.tar.gz +RUN echo "source /opt/dtk-24.04.1/env.sh" >> /root/.bashrc +# Disable compile warnings +RUN sed -i '74d' /opt/dtk-24.04.1/include/rocrand/rocrand_common.h + +# generate core dump +RUN echo "kernel.core_pattern=core_%e_%p_%t" >> /etc/sysctl.conf && \ + echo "kernel.core_uses_pid=0" >> /etc/sysctl.conf + +EXPOSE 22 diff --git a/tools/dockerfile/Dockerfile.develop.xre b/tools/dockerfile/Dockerfile.develop.xre new file mode 100644 index 00000000000000..b8913ad376a41f --- /dev/null +++ b/tools/dockerfile/Dockerfile.develop.xre @@ -0,0 +1,113 @@ +# Docker Image for PaddlePaddle Kunlun XPU + +FROM ubuntu:20.04 +LABEL maintainer="PaddlePaddle Authors " + +RUN apt-get update && apt-get install -y apt-utils +RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata +RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && add-apt-repository ppa:ubuntu-toolchain-r/test +RUN apt-get update && apt-get install -y curl wget vim git unzip unrar tar ntp xz-utils libssl-dev bzip2 gzip make automake \ + coreutils language-pack-zh-hans libsm6 libxext6 libxrender-dev libgl1-mesa-glx libsqlite3-dev libopenblas-dev liblapack3 \ + bison libjpeg-dev zlib1g zlib1g-dev swig locales net-tools libtool numactl libnuma-dev liblzma-dev libbz2-dev libblas-dev \ + openssl openssh-server libffi-dev pciutils libblas3 liblapack-dev libzstd-dev default-jre libgcc-s1 gcc g++ gfortran gdb + +# workdir +WORKDIR /opt + +# GCC 8.4 +RUN apt-get install -y gcc-8 g++-8 gfortran-8 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90 && \ + update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-8 90 + +# cmake 3.27.7 +RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \ + chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \ + ./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \ + rm -rf cmake-3.27.7-linux-x86_64.sh +ENV PATH=/opt/cmake-3.27.7/bin:${PATH} + +# default python version +ARG PY_VERSION=3.10 +RUN apt-get install -y python3-distutils python${PY_VERSION} python${PY_VERSION}-dev + +# install pip +RUN curl -s -q https://bootstrap.pypa.io/get-pip.py | /usr/bin/python${PY_VERSION} + +# set default python +RUN rm -rf /usr/bin/python3 && ln -s /usr/bin/python${PY_VERSION} /usr/bin/python3 && \ + rm -rf /usr/bin/python && ln -s /usr/bin/python${PY_VERSION} /usr/bin/python + +# install pylint and pre-commit +RUN pip install pre-commit==2.17.0 pylint pytest astroid isort coverage qtconsole distro +RUN pip install attrs pyyaml pathlib2 scipy requests psutil Cython clang-format==13.0.0 + +# add more libs +RUN apt-get update && apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev lsof libgeos-dev \ + pkg-config libhdf5-103 libhdf5-dev lrzsz libsndfile1 tree ninja-build -y + +# install Paddle requirement +RUN wget --no-check-certificate https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/requirements.txt -O requirements.txt && \ + pip install -r requirements.txt -i https://pip.baidu-int.com/simple --trusted-host pip.baidu-int.com && rm -rf requirements.txt +RUN wget --no-check-certificate https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/unittest_py/requirements.txt -O requirements.txt && \ + pip install -r requirements.txt -i https://pip.baidu-int.com/simple --trusted-host pip.baidu-int.com && rm -rf requirements.txt + +# git credential to skip password typing +RUN git config --global credential.helper store + +# Fix locales to en_US.UTF-8 +RUN localedef -i en_US -f UTF-8 en_US.UTF-8 + +# patchelf 0.14.5 - https://github.com/NixOS/patchelf/pull/216 +RUN wget -q --no-check-certificate https://github.com/NixOS/patchelf/archive/refs/tags/0.14.5.tar.gz && \ + tar xzf 0.14.5.tar.gz && cd patchelf-0.14.5 && \ + ./bootstrap.sh > /dev/null && ./configure > /dev/null && \ + make -j16 > /dev/null && make install > /dev/null && \ + cd .. && rm -rf patchelf-0.14.5 && rm -rf 0.14.5.tar.gz + +# ccache 4.6.3 +RUN wget -q https://github.com/ccache/ccache/releases/download/v4.6.3/ccache-4.6.3.tar.gz && \ + tar xf ccache-4.6.3.tar.gz && mkdir /usr/local/ccache-4.6.3 && cd ccache-4.6.3 && \ + mkdir build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=Release -DREDIS_STORAGE_BACKEND=OFF \ + -DCMAKE_INSTALL_PREFIX=/usr/local/ccache-4.6.3 .. > /dev/null && \ + make -j16 > /dev/null && make install > /dev/null && \ + cd ../../ && rm -rf ccache-4.6.3.tar.gz && rm -rf ccache-4.6.3 && \ + ln -s /usr/local/ccache-4.6.3/bin/ccache /usr/local/bin/ccache +ENV CCACHE_MAXSIZE=80G \ + CCACHE_LIMIT_MULTIPLE=0.8 \ + CCACHE_SLOPPINESS=clang_index_store,time_macros,include_file_mtime + +# Install XRE 4.31.0 +ARG XRE_VERSION=4.31.0 +ARG XRE_INSTALL=/usr/local/xpu-${XRE_VERSION} +RUN wget -q https://klx-sdk-release-public.su.bcebos.com/xre/release/${XRE_VERSION}.1/xre-ubuntu_2004_x86_64.tar.gz && \ + tar -zxf xre-ubuntu_2004_x86_64.tar.gz && \ + mkdir -p ${XRE_INSTALL} && \ + cp -af /opt/xre-ubuntu_2004_x86_64/bin/ ${XRE_INSTALL}/ && \ + cp -af /opt/xre-ubuntu_2004_x86_64/include/ ${XRE_INSTALL}/ && \ + cp -af /opt/xre-ubuntu_2004_x86_64/tools/ ${XRE_INSTALL}/ && \ + cp -af /opt/xre-ubuntu_2004_x86_64/version.txt ${XRE_INSTALL}/ && \ + mkdir -p ${XRE_INSTALL}/lib64 && \ + cp -af /opt/xre-ubuntu_2004_x86_64/lib/* ${XRE_INSTALL}/lib64/ && \ + cp -af /opt/xre-ubuntu_2004_x86_64/so/* ${XRE_INSTALL}/lib64/ && \ + ln -sf ${XRE_INSTALL} /usr/local/xpu && \ + ln -sf ${XRE_INSTALL}/bin/xpu_smi /usr/local/bin/xpu_smi && \ + rm -rf xre-ubuntu_2004_x86_64.tar.gz && rm -rf xre-ubuntu_2004_x86_64/ +ENV PATH=${XRE_INSTALL}/bin:$PATH + +# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service +RUN mkdir /var/run/sshd && echo 'root:root' | chpasswd && \ + sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config && \ + sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config +CMD source ~/.bashrc + +# /proc/sys/kernel/core_pattern +RUN mkdir -p /var/core + +# Clean +RUN apt-get clean -y +RUN pip cache purge + +EXPOSE 22 diff --git a/tools/dockerfile/Dockerfile.rocm b/tools/dockerfile/Dockerfile.rocm deleted file mode 100644 index 9b3e6c4b2f123d..00000000000000 --- a/tools/dockerfile/Dockerfile.rocm +++ /dev/null @@ -1,153 +0,0 @@ -# A image for building paddle binaries -# Use rocm-terminal base image for both rocm environment -# When you modify it, please be aware of rocm version -# -# Build: ROCM 4.0.1 -# cd Paddle/tools/dockerfile -# docker build -f Dockerfile.rocm \ -# -t paddlepaddle/paddle-centos-rocm401-dev:latest . -# -# docker run -it --device=/dev/kfd --device=/dev/dri \ -# --security-opt seccomp=unconfined --group-add video \ -# paddlepaddle/paddle-centos-rocm401-dev:latest /bin/bash - -FROM centos:7.8.2003 -MAINTAINER PaddlePaddle Authors - -ENV LC_ALL en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US.UTF-8 - -RUN yum install -y epel-release deltarpm sudo openssh-server gettext-devel sqlite-devel \ - zlib-devel openssl-devel pcre-devel vim tk-devel tkinter libtool xz graphviz wget curl-devel \ - make bzip2 git patch unzip bison yasm diffutils automake which file kernel-headers kernel-devel \ - net-tools numactl-devel chrpath screen initscripts - -# Install devtoolset-7 -RUN yum install -y yum-utils centos-release-scl && \ - yum-config-manager --enable rhel-server-rhscl-7-rpms && \ - yum-config-manager --enable rhel-7-server-rpms && \ - yum-config-manager --enable rhel-7-server-optional-rpms && \ - INSTALL_PKGS="devtoolset-7-binutils devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-gdb" && \ - yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ - rpm -V $INSTALL_PKGS && \ - yum -y clean all --enablerepo='*' -ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH -RUN echo "source scl_source enable devtoolset-7" > "/etc/profile.d/devtoolset-7.sh" - -# cmake 3.16.0 -WORKDIR /opt -RUN wget -q https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.tar.gz && \ - tar -zxvf cmake-3.18.0-Linux-x86_64.tar.gz && rm cmake-3.18.0-Linux-x86_64.tar.gz && \ - mv cmake-3.18.0-Linux-x86_64 cmake-3.16 -ENV PATH=/opt/cmake-3.18/bin:${PATH} - -# ROCM -RUN yum install -y kmod wget openblas-devel epel-release -RUN echo "[ROCm]" > /etc/yum.repos.d/rocm.repo && \ - echo "name=ROCm" >> /etc/yum.repos.d/rocm.repo && \ - echo "baseurl=http://repo.radeon.com/rocm/yum/4.0.1" >> /etc/yum.repos.d/rocm.repo && \ - echo "enabled=1" >> /etc/yum.repos.d/rocm.repo && \ - echo "gpgcheck=0" >> /etc/yum.repos.d/rocm.repo -RUN yum install -y rocm-dev rocm-utils rocfft miopen-hip rocblas hipsparse rocrand rccl hipcub rocthrust rocprofiler-dev roctracer-dev -# fix rocthrust -RUN sed -i '21 a #include ' /opt/rocm/include/thrust/system/hip/detail/error.inl -# export ROCM env -ENV ROCM_PATH=/opt/rocm -ENV HIP_PATH=/opt/rocm/hip -ENV HIP_CLANG_PATH=/opt/rocm/llvm/bin -ENV PATH=/opt/rocm/bin:$PATH -ENV PATH=/opt/rocm/opencl/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH - -# git 2.17.1 -RUN cd /opt && wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz && \ - tar -xvf git-2.17.1.tar.gz && \ - cd git-2.17.1 && \ - ./configure --with-openssl --prefix=/usr/local && \ - make -j8 && make install && \ - cd .. && rm -rf git-2.17.1.tar.gz && rm -rf git-2.17.1 - -ENV GOROOT=/usr/local/go -ENV GOPATH=/root/gopath -ENV PATH=${GOROOT}/bin:${GOPATH}/bin:${PATH} - -# go 1.8.1 -RUN wget --no-check-certificate -qO- https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | \ - tar -xz -C /usr/local && \ - mkdir /root/gopath && \ - mkdir /root/gopath/bin && \ - mkdir /root/gopath/src - -# protobuf 3.6.1 -RUN cd /opt && wget -q --no-check-certificate https://paddle-ci.cdn.bcebos.com/protobuf-cpp-3.6.1.tar.gz && \ - tar xzf protobuf-cpp-3.6.1.tar.gz && \ - cd protobuf-3.6.1 && ./configure && make -j4 && make install && \ - cd .. && rm -f protobuf-cpp-3.6.1.tar.gz && rm -rf protobuf-3.6.1 - -# conda -ENV CONDA_FILE=Miniconda3-py38_23.10.0-1-Linux-x86_64.sh -RUN cd /opt && wget https://repo.anaconda.com/miniconda/${CONDA_FILE} && chmod +x ${CONDA_FILE} -RUN mkdir /opt/conda && ./${CONDA_FILE} -b -f -p "/opt/conda" && rm -rf ${CONDA_FILE} -ENV PATH=/opt/conda/bin:${PATH} -RUN conda init bash && conda install -n base jupyter jupyterlab - -# install pytest and pre-commit -RUN /opt/conda/bin/pip install pre-commit pytest protocol PyGithub - -# install Paddle requirement -RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/requirements.txt -O /root/requirements.txt -RUN /opt/conda/bin/pip install -r /root/requirements.txt && \ - rm -rf /root/requirements.txt - -RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/unittest_py/requirements.txt -O /root/requirements.txt -RUN /opt/conda/bin/pip install -r /root/requirements.txt && rm -rf /root/requirements.txt - -# install PaddleClas requirement -RUN wget https://raw.githubusercontent.com/PaddlePaddle/PaddleClas/develop/requirements.txt -O /root/requirements.txt -RUN /opt/conda/bin/pip install -r /root/requirements.txt && rm -rf /root/requirements.txt - -# install PaddleDetection requirement -RUN wget https://raw.githubusercontent.com/PaddlePaddle/PaddleDetection/develop/requirements.txt -O /root/requirements.txt -RUN /opt/conda/bin/pip install -r /root/requirements.txt && rm -rf /root/requirements.txt - -# configure ssh -RUN sed -i "s/^#PermitRootLogin/PermitRootLogin/" /etc/ssh/sshd_config && \ - sed -i "s/^#PubkeyAuthentication/PubkeyAuthentication/" /etc/ssh/sshd_config && \ - sed -i "s/^#RSAAuthentication/RSAAuthentication/" /etc/ssh/sshd_config - -# clang-format 3.8 -RUN wget https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.8.0/repo/epel-7/alonid-llvm-3.8.0-epel-7.repo -P /etc/yum.repos.d/ -RUN yum install -y clang-3.8.0 -ENV PATH=/opt/llvm-3.8.0/bin:${PATH} - -# patchelf -RUN yum install -y patchelf && \ - yum clean all && \ - rm -rf /var/cache/yum && \ - rm -rf /var/lib/yum/yumdb && \ - rm -rf /var/lib/yum/history - -# swig 2.0.12 -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 && \ - 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 && rm -rf swig-2.0.12 - -# ccache 3.7.9 -RUN cd /opt && wget https://paddle-ci.gz.bcebos.com/ccache-3.7.9.tar.gz && \ - tar xf ccache-3.7.9.tar.gz && mkdir /usr/local/ccache-3.7.9 && cd ccache-3.7.9 && \ - ./configure -prefix=/usr/local/ccache-3.7.9 && \ - make -j8 && make install && \ - ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache && \ - cd .. && rm -rf ccache-3.7.9.tar.gz && rm -rf ccache-3.7.9 - -# configure ssh -RUN sed -i "s/^#PermitRootLogin/PermitRootLogin/" /etc/ssh/sshd_config && \ - sed -i "s/^#PubkeyAuthentication/PubkeyAuthentication/" /etc/ssh/sshd_config && \ - sed -i "s/^#RSAAuthentication/RSAAuthentication/" /etc/ssh/sshd_config && \ - sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config - -RUN ssh-keygen -A - -EXPOSE 22 From daefad0c99a92d5ff770b96ca328368a6aa0748f Mon Sep 17 00:00:00 2001 From: qili93 Date: Wed, 3 Jul 2024 15:29:52 +0800 Subject: [PATCH 2/2] update comments --- tools/dockerfile/Dockerfile.develop.dtk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/Dockerfile.develop.dtk b/tools/dockerfile/Dockerfile.develop.dtk index 117e61abad8b8e..20a7390f38de63 100644 --- a/tools/dockerfile/Dockerfile.develop.dtk +++ b/tools/dockerfile/Dockerfile.develop.dtk @@ -94,7 +94,7 @@ RUN yum clean all && \ # Install DTK RUN wget -q https://cancon.hpccube.com:65024/file/1/DTK-24.04.1/CentOS7.6/DTK-24.04.1-CentOS7.6-x86_64.tar.gz && \ tar zxf DTK-24.04.1-CentOS7.6-x86_64.tar.gz && rm -rf DTK-24.04.1-CentOS7.6-x86_64.tar.gz -# Replace if you use other device type: Z100, Z100L, K100, e.g. +# Replace if you use other device type, e.g. Z100, Z100L, K100 RUN wget -q https://paddle-device.bj.bcebos.com/dcu/hyhal-K100AI.tar.gz && \ tar zxf hyhal-K100AI.tar.gz && rm -rf hyhal-K100AI.tar.gz RUN echo "source /opt/dtk-24.04.1/env.sh" >> /root/.bashrc