Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9000e331
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9000e331
编写于
4月 04, 2023
作者:
K
Kim Yann
提交者:
GitHub
4月 04, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rem useless mlu nup dockerfile (#52474)
上级
3ebd5af8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
0 addition
and
455 deletion
+0
-455
tools/dockerfile/Dockerfile.mlu
tools/dockerfile/Dockerfile.mlu
+0
-84
tools/dockerfile/Dockerfile.npu_aarch64
tools/dockerfile/Dockerfile.npu_aarch64
+0
-184
tools/dockerfile/Dockerfile.npu_x86_64
tools/dockerfile/Dockerfile.npu_x86_64
+0
-177
tools/dockerfile/Dockerfile.paddle-mlu-build
tools/dockerfile/Dockerfile.paddle-mlu-build
+0
-5
tools/dockerfile/Dockerfile.paddle-npu-build
tools/dockerfile/Dockerfile.paddle-npu-build
+0
-5
未找到文件。
tools/dockerfile/Dockerfile.mlu
已删除
100644 → 0
浏览文件 @
3ebd5af8
# A image for building paddle binaries
# Update CNTOOLKIT_VERSION, CNNL_VERSION, CNCL_VERSION and MLUOPS_VERSION if using other versions
#
# Build:
# - CNTOOLKIT_VERSION 3.0.2-1
# - CNNL_VERSION 1.13.0-1
# - CNCL_VERSION 1.2.1-1
# - MLUOPS_VERSION 0.2.0-1
#
# Download three packages from FTP (need to connect cambricon AE to get FTP url)
# - cntoolkit_3.0.2-1.ubuntu18.04_amd64.deb
# - cnnl_1.13.0-1.ubuntu18.04_amd64.deb
# - cncl_1.2.1-1.ubuntu18.04_amd64.deb
# - mluops_0.2.0-1.ubuntu18.04_amd64.deb
# copy them to current directory first, then run build commands
#
# For example:
#
# cd Paddle/tools/dockerfile
#
# (get cntoolkit pkg)
# (get cnnl pkg)
# (get cncl pkg)
# (get mluops pkg)
#
# docker build -f Dockerfile.mlu \
# --build-arg CNTOOLKIT_VERSION=3.0.2-1 \
# --build-arg CNNL_VERSION=1.13.0-1 \
# --build-arg CNCL_VERSION=1.2.1-1 \
# --build-arg MLUOPS_VERSION=0.2.0-1 \
# -t paddlepaddle/paddle:latest-dev-mlu .
#
# without mlu device:
# docker run -it --network=host --pids-limit 409600 \
# paddlepaddle/paddle:latest-dev-mlu /bin/bash
#
# with mlu device:
# docker run -it --network=host --pids-limit 409600 \
# --device=/dev/cambricon_ctl --device=/dev/cambricon_dev0 \
# paddlepaddle/paddle:latest-dev-mlu /bin/bash
FROM registry.baidubce.com/paddlepaddle/paddle:latest-dev
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
ENV WITH_GPU=OFF
ARG CNTOOLKIT_VERSION=3.0.2-1
ARG CNNL_VERSION=1.13.0-1
ARG CNCL_VERSION=1.2.1-1
ARG MLUOPS_VERSION=0.2.0-1
ARG CNTOOLKIT_PKG=cntoolkit_$CNTOOLKIT_VERSION.ubuntu18.04_amd64.deb
ARG CNNL_PKG=cnnl_$CNNL_VERSION.ubuntu18.04_amd64.deb
ARG CNCL_PKG=cncl_$CNCL_VERSION.ubuntu18.04_amd64.deb
ARG MLUOPS_PKG=mluops_$MLUOPS_VERSION.ubuntu18.04_amd64.deb
# install cntoolkit
COPY $CNTOOLKIT_PKG ./
RUN dpkg -i $CNTOOLKIT_PKG && \
apt-get update && \
apt-get install -y cnrt cnperf cnpapi cnlicense cngdb cndrv cndev cncodec cncc cnas cnbin cnstudio cnrtc cnpx && \
rm -f $CNTOOLKIT_PKG
ENV NEUWARE_HOME=/usr/local/neuware
ENV LD_LIBRARY_PATH=$NEUWARE_HOME/lib64:$LD_LIBRARY_PATH
# install cnnl
COPY $CNNL_PKG ./
RUN dpkg -i $CNNL_PKG && \
rm -f $CNNL_PKG
# install cncl
COPY $CNCL_PKG ./
RUN dpkg -i $CNCL_PKG && \
rm -f $CNCL_PKG
# install mluops
COPY $MLUOPS_PKG ./
RUN dpkg -i $MLUOPS_PKG && \
rm -f $MLUOPS_PKG
# Clean
RUN apt-get clean -y
EXPOSE 22
tools/dockerfile/Dockerfile.npu_aarch64
已删除
100644 → 0
浏览文件 @
3ebd5af8
# A image for building paddle binaries
# Use cann 5.0.2.alpha005 and aarch64 for A300t-9000
# Update CANN_VERSION if using other versions
#
# Build: CANN 5.0.2.alpha005
# Download pkgs from https://www.hiascend.com/software/cann/community
# and copy them to current dir first, then run build commands
# cd Paddle/tools/dockerfile
# docker build -f Dockerfile.npu_aarch64 \
# --build-arg CANN_VERSION=5.0.2.alpha005 \
# -t paddlepaddle/paddle:latest-dev-5.0.2.alpha005-gcc82-aarch64 .
#
# docker run -it --pids-limit 409600 \
# -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
# -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
# -v /usr/local/dcmi:/usr/local/dcmi \
# paddlepaddle/paddle:latest-dev-5.0.2.alpha005-gcc82-aarch64 /bin/bash
FROM ubuntu:18.04
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
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 xz-utils libssl-dev bzip2 gzip make libgcc-s1 sudo openssh-server \
coreutils ntp language-pack-zh-hans python-qt4 libsm6 libxext6 libxrender-dev libgl1-mesa-glx libsqlite3-dev libopenblas-dev \
bison graphviz libjpeg-dev zlib1g zlib1g-dev automake locales swig net-tools libtool module-init-tools numactl libnuma-dev \
openssl libffi-dev pciutils libblas-dev gfortran libblas3 liblapack-dev liblapack3 default-jre screen tmux gdb lldb gcc g++
# GCC 8.2
WORKDIR /opt
RUN wget -q https://paddle-ci.gz.bcebos.com/gcc-8.2.0.tar.xz && \
tar -xvf gcc-8.2.0.tar.xz && cd gcc-8.2.0 && \
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \
./contrib/download_prerequisites && \
cd .. && mkdir temp_gcc82 && cd temp_gcc82 && \
../gcc-8.2.0/configure --prefix=/opt/compiler/gcc-8.2 --enable-threads=posix --disable-checking --disable-multilib && \
make -j8 && make install && \
cd .. && rm -rf temp_gcc82 && rm -rf gcc-8.2.0* && \
cd /usr/lib/aarch64-linux-gnu && \
mv libstdc++.so.6 libstdc++.so.6.bak && mv libstdc++.so.6.0.25 libstdc++.so.6.0.25.bak && \
ln -s /opt/compiler/gcc-8.2/lib64/libgfortran.so.5 /usr/lib/aarch64-linux-gnu/libstdc++.so.5 && \
ln -s /opt/compiler/gcc-8.2/lib64/libstdc++.so.6 /usr/lib/aarch64-linux-gnu/libstdc++.so.6 && \
cp /opt/compiler/gcc-8.2/lib64/libstdc++.so.6.0.25 /usr/lib/aarch64-linux-gnu && \
cd /usr/bin && mv gcc gcc.bak && mv g++ g++.bak && \
ln -s /opt/compiler/gcc-8.2/bin/gcc /usr/bin/gcc && \
ln -s /opt/compiler/gcc-8.2/bin/g++ /usr/bin/g++
ENV PATH=/opt/compiler/gcc-8.2/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LIBRARY_PATH
# cmake 3.19
WORKDIR /opt
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \
tar -zxvf cmake-3.19.8-Linux-aarch64.tar.gz && rm cmake-3.19.8-Linux-aarch64.tar.gz && \
mv cmake-3.19.8-Linux-aarch64 cmake-3.19
ENV PATH=/opt/cmake-3.19/bin:${PATH}
# conda 4.9.2
WORKDIR /opt
ARG CONDA_FILE=Miniconda3-py37_4.9.2-Linux-aarch64.sh
RUN cd /opt && wget -q 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 pylint and pre-commit
RUN /opt/conda/bin/pip install pre-commit pylint pylint pytest astroid isort coverage qtconsole
# install CANN 5.0.2 requirement
RUN /opt/conda/bin/pip install 'numpy<1.20,>=1.13.3' 'decorator>=4.4.0' 'sympy>=1.4' 'cffi>=1.12.3' 'protobuf>=3.11.3'
RUN /opt/conda/bin/pip install attrs pyyaml pathlib2 scipy requests psutil
# 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 Go and glide
RUN wget -qO- https://golang.org/dl/go1.16.5.linux-arm64.tar.gz | \
tar -xz -C /usr/local && \
mkdir /root/gopath && \
mkdir /root/gopath/bin && \
mkdir /root/gopath/src
ENV GOROOT=/usr/local/go GOPATH=/root/gopath
# should not be in the same line with GOROOT definition, otherwise docker build could not find GOROOT.
ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin
# install glide
RUN curl -s -q https://glide.sh/get | sh
# 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
RUN apt-get install libprotobuf-dev -y
RUN apt install lsof -y
# Older versions of patchelf limited the size of the files being processed and were fixed in this pr.
# https://github.com/NixOS/patchelf/commit/ba2695a8110abbc8cc6baf0eea819922ee5007fa
# So install a newer version here.
RUN wget -q http://ports.ubuntu.com/pool/universe/p/patchelf/patchelf_0.10-2build1_arm64.deb && \
dpkg -i patchelf_0.10-2build1_arm64.deb && rm -rf patchelf_0.10-2build1_arm64.deb
# 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
# ccache 3.7.9
RUN 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 && cd .. && rm -rf ccache-3.7.9* && \
ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache
# clang-form 3.8.0
RUN wget https://releases.llvm.org/3.8.0/clang+llvm-3.8.0-aarch64-linux-gnu.tar.xz && \
tar xf clang+llvm-3.8.0-aarch64-linux-gnu.tar.xz && cd clang+llvm-3.8.0-aarch64-linux-gnu && \
cp -r * /usr/local && cd .. && rm -rf clang+llvm-3.8.0-aarch64-linux-gnu*
# HwHiAiUser
RUN groupadd HwHiAiUser && \
useradd -g HwHiAiUser -m -d /home/HwHiAiUser HwHiAiUser
# copy /etc/ascend_install.info to current dir fist
COPY ascend_install.info /etc/ascend_install.info
# copy /usr/local/Ascend/driver/version.info to current dir fist
RUN mkdir -p /usr/local/Ascend/driver
COPY version.info /usr/local/Ascend/driver/version.info
# Download packages from https://www.hiascend.com/software/cann/community and copy them to current dir first
WORKDIR /usr/local/Ascend
ARG CANN_VERSION=5.0.2.alpha005
# update envs for driver
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64/common:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64/driver:$LD_LIBRARY_PATH
# Install Ascend toolkit
COPY Ascend-cann-toolkit_${CANN_VERSION}_linux-aarch64.run /usr/local/Ascend/
RUN chmod +x Ascend-cann-toolkit_${CANN_VERSION}_linux-aarch64.run && \
./Ascend-cann-toolkit_${CANN_VERSION}_linux-aarch64.run --install --quiet && \
rm -rf Ascend-cann-toolkit_${CANN_VERSION}_linux-aarch64.run
# udpate envs for model transformation and operator develop
ENV PATH=/usr/local/Ascend/ascend-toolkit/latest/atc/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/atc/lib64:$LD_LIBRARY_PATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/pyACL/python/site-packages/acl:$PYTHONPATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/atc/python/site-packages:$PYTHONPATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/toolkit/python/site-packages:$PYTHONPATH
ENV TOOLCHAIN_HOME=/usr/local/Ascend/ascend-toolkit/latest/toolkit
# Install Ascend NNAE
COPY Ascend-cann-nnae_${CANN_VERSION}_linux-aarch64.run /usr/local/Ascend/
RUN chmod +x Ascend-cann-nnae_${CANN_VERSION}_linux-aarch64.run && \
./Ascend-cann-nnae_${CANN_VERSION}_linux-aarch64.run --install --quiet && \
rm -rf Ascend-cann-nnae_${CANN_VERSION}_linux-aarch64.run
# update envs for third party AI framework develop
ENV PATH=/usr/local/Ascend/nnae/latest/fwkacllib/bin:$PATH
ENV PATH=/usr/local/Ascend/nnae/latest/fwkacllib/ccec_compiler/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/nnae/latest/fwkacllib/lib64:$LD_LIBRARY_PATH
ENV PYTHONPATH=/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages:$PYTHONPATH
ENV ASCEND_AICPU_PATH=/usr/local/Ascend/nnae/latest
ENV ASCEND_OPP_PATH=/usr/local/Ascend/nnae/latest/opp
# DEV image should open error level log
# 0 debug; 1 info; 2 warning; 3 error; 4 null
ENV ASCEND_GLOBAL_LOG_LEVEL=3
RUN rm -rf /usr/local/Ascend/driver
# Create /lib64/ld-linux-aarch64.so.1
RUN umask 0022 && \
if [ ! -d "/lib64" ]; \
then \
mkdir /lib64 && ln -sf /lib/ld-linux-aarch64.so.1 /lib64/ld-linux-aarch64.so.1; \
fi
# Clean
RUN apt-get clean -y
EXPOSE 22
tools/dockerfile/Dockerfile.npu_x86_64
已删除
100644 → 0
浏览文件 @
3ebd5af8
# A image for building paddle binaries
# Use cann 5.0.2.alpha005 and x86_64 for A300t-9000
# Update CANN_VERSION if using other versions
#
# Build: CANN 5.0.2.alpha005
# Download pkgs from https://www.hiascend.com/software/cann/community
# and copy them to current dir first, then run build commands
# cd Paddle/tools/dockerfile
# docker build -f Dockerfile.npu_x86_64 \
# --build-arg CANN_VERSION=5.0.2.alpha005 \
# -t paddlepaddle/paddle:latest-dev-5.0.2.alpha005-gcc82-x86_64 .
#
# docker run -it --pids-limit 409600 \
# -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
# -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
# -v /usr/local/dcmi:/usr/local/dcmi \
# paddlepaddle/paddle:latest-dev-5.0.2.alpha005-gcc82-x86_64 /bin/bash
FROM ubuntu:18.04
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
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 xz-utils libssl-dev bzip2 gzip make libgcc-s1 sudo openssh-server \
coreutils ntp language-pack-zh-hans python-qt4 libsm6 libxext6 libxrender-dev libgl1-mesa-glx libsqlite3-dev libopenblas-dev \
bison graphviz libjpeg-dev zlib1g zlib1g-dev automake locales swig net-tools libtool module-init-tools numactl libnuma-dev \
openssl libffi-dev pciutils libblas-dev gfortran libblas3 liblapack-dev liblapack3 default-jre screen tmux gdb lldb gcc g++
# GCC 8.2
WORKDIR /opt
RUN wget -q https://paddle-ci.gz.bcebos.com/gcc-8.2.0.tar.xz && \
tar -xvf gcc-8.2.0.tar.xz && cd gcc-8.2.0 && \
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \
./contrib/download_prerequisites && \
cd .. && mkdir temp_gcc82 && cd temp_gcc82 && \
../gcc-8.2.0/configure --prefix=/opt/compiler/gcc-8.2 --enable-threads=posix --disable-checking --disable-multilib && \
make -j8 && make install && \
cd .. && rm -rf temp_gcc82 && rm -rf gcc-8.2.0* && \
cd /usr/lib/x86_64-linux-gnu && \
mv libstdc++.so.6 libstdc++.so.6.bak && mv libstdc++.so.6.0.25 libstdc++.so.6.0.25.bak && \
ln -s /opt/compiler/gcc-8.2/lib64/libgfortran.so.5 /usr/lib/x86_64-linux-gnu/libstdc++.so.5 && \
ln -s /opt/compiler/gcc-8.2/lib64/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 && \
cp /opt/compiler/gcc-8.2/lib64/libstdc++.so.6.0.25 /usr/lib/x86_64-linux-gnu && \
cd /usr/bin && mv gcc gcc.bak && mv g++ g++.bak && \
ln -s /opt/compiler/gcc-8.2/bin/gcc /usr/bin/gcc && \
ln -s /opt/compiler/gcc-8.2/bin/g++ /usr/bin/g++
ENV PATH=/opt/compiler/gcc-8.2/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LIBRARY_PATH
# cmake 3.16
WORKDIR /opt
RUN wget -q https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.tar.gz && \
tar -zxvf cmake-3.16.0-Linux-x86_64.tar.gz && rm cmake-3.16.0-Linux-x86_64.tar.gz && \
mv cmake-3.16.0-Linux-x86_64 cmake-3.16
ENV PATH=/opt/cmake-3.16/bin:${PATH}
# conda 4.9.2
WORKDIR /opt
ARG CONDA_FILE=Miniconda3-py37_4.9.2-Linux-x86_64.sh
RUN cd /opt && wget -q 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 pylint and pre-commit
RUN /opt/conda/bin/pip install pre-commit pylint pylint pytest astroid isort coverage qtconsole
# install CANN 5.0.2 requirement
RUN /opt/conda/bin/pip install 'numpy<1.20,>=1.13.3' 'decorator>=4.4.0' 'sympy>=1.4' 'cffi>=1.12.3' 'protobuf>=3.11.3'
RUN /opt/conda/bin/pip install attrs pyyaml pathlib2 scipy requests psutil
# 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 Go and glide
RUN wget -qO- https://paddle-ci.cdn.bcebos.com/go1.8.1.linux-amd64.tar.gz | \
tar -xz -C /usr/local && \
mkdir /root/gopath && \
mkdir /root/gopath/bin && \
mkdir /root/gopath/src
ENV GOROOT=/usr/local/go GOPATH=/root/gopath
# should not be in the same line with GOROOT definition, otherwise docker build could not find GOROOT.
ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin
# install glide
RUN curl -s -q https://glide.sh/get | sh
# 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
RUN apt-get install libprotobuf-dev -y
RUN apt install lsof -y
# Older versions of patchelf limited the size of the files being processed and were fixed in this pr.
# https://github.com/NixOS/patchelf/commit/ba2695a8110abbc8cc6baf0eea819922ee5007fa
# So install a newer version here.
RUN wget -q https://paddle-ci.cdn.bcebos.com/patchelf_0.10-2_amd64.deb && \
dpkg -i patchelf_0.10-2_amd64.deb && rm -rf patchelf_0.10-2_amd64.deb
# 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
# ccache 3.7.9
RUN 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 && cd .. && rm -rf ccache-3.7.9* && \
ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache
# clang-form 3.8.0
RUN wget https://paddle-ci.cdn.bcebos.com/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
tar xf clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && cd clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-16.04 && \
cp -r * /usr/local && cd .. && rm -rf clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-16.04 && \
rm -rf clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
# HwHiAiUser
RUN groupadd HwHiAiUser && \
useradd -g HwHiAiUser -m -d /home/HwHiAiUser HwHiAiUser
# copy /etc/ascend_install.info to current dir fist
COPY ascend_install.info /etc/ascend_install.info
# copy /usr/local/Ascend/driver/version.info to current dir fist
RUN mkdir -p /usr/local/Ascend/driver
COPY version.info /usr/local/Ascend/driver/version.info
# Download packages from https://www.hiascend.com/software/cann/community and copy them to current dir first
WORKDIR /usr/local/Ascend
ARG CANN_VERSION=5.0.2.alpha005
# update envs for driver
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64/common:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64/driver:$LD_LIBRARY_PATH
# Install Ascend toolkit
COPY Ascend-cann-toolkit_${CANN_VERSION}_linux-x86_64.run /usr/local/Ascend/
RUN chmod +x Ascend-cann-toolkit_${CANN_VERSION}_linux-x86_64.run && \
./Ascend-cann-toolkit_${CANN_VERSION}_linux-x86_64.run --install --quiet && \
rm -rf Ascend-cann-toolkit_${CANN_VERSION}_linux-x86_64.run
# udpate envs for model transformation and operator develop
ENV PATH=/usr/local/Ascend/ascend-toolkit/latest/atc/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/atc/lib64:$LD_LIBRARY_PATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/pyACL/python/site-packages/acl:$PYTHONPATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/atc/python/site-packages:$PYTHONPATH
ENV PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/toolkit/python/site-packages:$PYTHONPATH
ENV TOOLCHAIN_HOME=/usr/local/Ascend/ascend-toolkit/latest/toolkit
# Install Ascend NNAE
COPY Ascend-cann-nnae_${CANN_VERSION}_linux-x86_64.run /usr/local/Ascend/
RUN chmod +x Ascend-cann-nnae_${CANN_VERSION}_linux-x86_64.run && \
./Ascend-cann-nnae_${CANN_VERSION}_linux-x86_64.run --install --quiet && \
rm -rf Ascend-cann-nnae_${CANN_VERSION}_linux-x86_64.run
# update envs for third party AI framework develop
ENV PATH=/usr/local/Ascend/nnae/latest/fwkacllib/bin:$PATH
ENV PATH=/usr/local/Ascend/nnae/latest/fwkacllib/ccec_compiler/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/Ascend/nnae/latest/fwkacllib/lib64:$LD_LIBRARY_PATH
ENV PYTHONPATH=/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages:$PYTHONPATH
ENV ASCEND_AICPU_PATH=/usr/local/Ascend/nnae/latest
ENV ASCEND_OPP_PATH=/usr/local/Ascend/nnae/latest/opp
# DEV image should open error level log
# 0 debug; 1 info; 2 warning; 3 error; 4 null
ENV ASCEND_GLOBAL_LOG_LEVEL=3
RUN rm -rf /usr/local/Ascend/driver
# Clean
RUN apt-get clean -y
EXPOSE 22
tools/dockerfile/Dockerfile.paddle-mlu-build
已删除
100644 → 0
浏览文件 @
3ebd5af8
FROM registry.baidubce.com/qili93/paddle-mlu:neuware-latest
RUN apt-get install pigz -y
RUN apt-get remove -y openjdk*
CMD ["/bin/bash"]
EXPOSE 22
tools/dockerfile/Dockerfile.paddle-npu-build
已删除
100644 → 0
浏览文件 @
3ebd5af8
FROM registry.baidubce.com/paddlepaddle/paddle-npu:latest-dev-cann5.0.2.alpha005-gcc82-x86_64-with-driver
RUN apt-get install pigz -y
RUN apt-get remove -y openjdk*
CMD ["/bin/bash"]
EXPOSE 22
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录