Skip to content

Commit 90ad2ea

Browse files
zxk114pansgg
authored andcommitted
build: fix some issue
1 parent 1449786 commit 90ad2ea

6 files changed

+39
-25
lines changed

docker/Dockerfile.ascend.develop.ubuntu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ ENV LD_LIBRARY_PATH=${ASCEND_PATH}/ascend-toolkit/latest/fwkacllib/lib64${LD_LIB
3535
WORKDIR /root
3636

3737
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
38+
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
3839
if [ "$(arch)" = "aarch64" ];then sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
39-
rm -rf /var/lib/dpkg/info/* && \
4040
apt update && apt upgrade -y && \
4141
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools apt-utils && \
4242
apt install -y dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates \
@@ -50,7 +50,7 @@ RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shang
5050
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \
5151
update-alternatives --config python3 && \
5252
ln -sf opencv4/opencv2 /usr/local/include/opencv2 && \
53-
rm -rf /var/lib/apt/lists/* /root/*
53+
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
5454

5555
RUN mkdir -p /root/.pip && \
5656
echo "[global]" > /root/.pip/pip.conf && \
@@ -61,7 +61,7 @@ RUN mkdir -p /root/.pip && \
6161
groupadd HwHiAiUser && \
6262
useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser && \
6363
python3 -m pip install --upgrade pip && \
64-
python3 -m pip install --no-cache-dir wheel numpy attrs psutil decorator protobuf scipy sympy cffi grpcio grpcio-tools requests pillow pyyaml opencv-contrib-python && \
64+
python3 -m pip install --no-cache-dir wheel numpy attrs psutil decorator protobuf scipy sympy cffi grpcio grpcio-tools requests pillow pyyaml opencv-python==4.5.5.64 && \
6565
python3 -m pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.6.1/MindSpore/ascend/$(arch)/mindspore_ascend-1.6.1-cp37-cp37m-linux_$(arch).whl && \
6666
python3 -m pip install --no-cache-dir ${ASCEND_PATH}/ascend-toolkit/latest/fwkacllib/lib64/topi-0.4.0-py3-none-any.whl && \
6767
python3 -m pip install --no-cache-dir ${ASCEND_PATH}/ascend-toolkit/latest/fwkacllib/lib64/te-0.4.0-py3-none-any.whl && \

docker/Dockerfile.ascend.runtime.ubuntu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ ENV LD_LIBRARY_PATH=${ASCEND_PATH}/nnae/latest/fwkacllib/lib64${LD_LIBRARY_PATH:
2020
WORKDIR /root
2121

2222
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
23+
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
2324
if [ "$(arch)" = "aarch64" ];then sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
24-
rm -rf /var/lib/dpkg/info/* && \
2525
apt update && apt upgrade -y && \
2626
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
27-
apt install -y dbus systemd systemd-cron iproute2 gnupg2 libfuse2 libgtk-3-0 \
27+
apt install -y dbus systemd systemd-cron iproute2 gnupg2 libfuse2 libgtk-3-0 apt-utils \
2828
build-essential bash unzip ffmpeg curl pkg-config ca-certificates libduktape202 \
2929
libssl1.1 libcpprest libswscale4 libavformat57 graphviz libprotobuf-c1 libopenblas-base && \
3030
rm -f /usr/bin/python3 /usr/bin/python && \
3131
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 100 && \
3232
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \
3333
update-alternatives --config python3 && \
34-
rm -rf /var/lib/apt/lists/*
34+
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
3535

3636
RUN mkdir -p /root/.pip && \
3737
echo "[global]" > /root/.pip/pip.conf && \
@@ -42,7 +42,7 @@ RUN mkdir -p /root/.pip && \
4242
groupadd HwHiAiUser && \
4343
useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser && \
4444
python3 -m pip install --upgrade pip && \
45-
python3 -m pip install --no-cache-dir numpy decorator sympy cffi pyyaml pathlib2 grpcio grpcio-tools protobuf scipy requests pillow opencv-contrib-python && \
45+
python3 -m pip install --no-cache-dir numpy decorator sympy cffi pyyaml pathlib2 grpcio grpcio-tools protobuf scipy requests pillow opencv-python==4.5.5.64 && \
4646
python3 -m pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.6.1/MindSpore/ascend/$(arch)/mindspore_ascend-1.6.1-cp37-cp37m-linux_$(arch).whl && \
4747
python3 -m pip install --no-cache-dir ${ASCEND_PATH}/nnae/latest/fwkacllib/lib64/topi-0.4.0-py3-none-any.whl && \
4848
python3 -m pip install --no-cache-dir ${ASCEND_PATH}/nnae/latest/fwkacllib/lib64/te-0.4.0-py3-none-any.whl && \

docker/Dockerfile.cuda.develop.openeuler

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ADD *.tar.gz /usr/local/
88

99
ARG CUDA_VER
1010
ARG CUDA_VERSION
11+
ARG TF_VERSION
1112
ARG TRT_VERSION
1213
ARG TORCH_VERSION
1314
ARG CUDA_CUDART_VERSION
@@ -59,22 +60,28 @@ RUN if [ "${CUDA_VERSION}" = "10.2" ]; then \
5960
libcudnn8-devel-${dnn_ver} && \
6061
if [ -n "${TF_VERSION}" ]; then \
6162
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
62-
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \
63+
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
64+
cp -af lib/* /usr/local/lib64/ && \
65+
cp -af include /usr/local/ && \
6366
python3 -m pip install --no-cache-dir tensorflow-gpu==2.6.0; \
6467
elif [ -n "${TORCH_VERSION}" ]; then \
6568
curl -LO https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.9.1%2Bcu102.zip && \
6669
unzip libtorch-*.zip -d /root >/dev/null 2>&1 && \
6770
cp -af libtorch/{include,lib,share} /usr/local/; \
6871
elif [ -n "${TRT_VERSION}" ]; then \
6972
if [ "${TRT_VERSION}" = "7.1.3.4" ]; then \
70-
trt_ver="7.1.3-1.cuda10.2" ; \
73+
trt_ver="7-7.1.3-1.cuda10.2" ; \
7174
elif [ "${TRT_VERSION}" = "8.4.2.4" ]; then \
72-
trt_ver="8.4.2-1.cuda11.6";fi && \
75+
trt_ver="8-8.4.2-1.cuda11.6";fi && \
7376
dnf install -y --nogpgcheck --setopt=obsoletes=0 \
74-
libnvinfer-devel-${trt_ver} \
75-
libnvonnxparsers-devel-${trt_ver} \
76-
libnvparsers-devel-${trt_ver} \
77-
libnvinfer-plugin-devel-${trt_ver};fi && \
77+
libnvinfer${trt_ver} \
78+
libnvinfer-devel-${trt_ver#*-} \
79+
libnvonnxparsers${trt_ver} \
80+
libnvonnxparsers-devel-${trt_ver#*-} \
81+
libnvparsers${trt_ver} \
82+
libnvparsers-devel-${trt_ver#*-} \
83+
libnvinfer-plugin${trt_ver} \
84+
libnvinfer-plugin-devel-${trt_ver#*-};fi && \
7885
dnf clean all && rm -rf /var/cache/dnf/* /root/*
7986

8087
RUN python3 -m pip install --no-cache-dir /opt/release/python/modelbox-*.whl && \

docker/Dockerfile.cuda.develop.ubuntu

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ ARG BASE_IMAGE=ubuntu:18.04
22
FROM ${BASE_IMAGE} as base
33

44
COPY release /opt/release
5+
56
ADD *.tar.gz /usr/local/
67

78
ARG CUDA_VER
89
ARG CUDA_VERSION
10+
ARG TF_VERSION
911
ARG TRT_VERSION
1012
ARG TORCH_VERSION
1113
ARG CUDA_CUDART_VERSION
@@ -15,10 +17,10 @@ ARG NVIDIA_REQUIRE_CUDA
1517
WORKDIR /root
1618

1719
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
20+
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
1821
apt update && apt upgrade -y && \
19-
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
20-
apt install -y \
21-
dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates \
22+
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools apt-utils && \
23+
apt install -y dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates \
2224
build-essential unzip ffmpeg sudo bash vim gdb git doxygen autoconf cmake gettext openssh-server \
2325
pkg-config kmod net-tools pciutils libgtk-3-dev libprotobuf-c-dev protobuf-c-compiler duktape-dev \
2426
libssl-dev libcpprest-dev libswscale-dev libavformat-dev graphviz libgraphviz-dev libfuse-dev \
@@ -29,15 +31,15 @@ RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shang
2931
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \
3032
update-alternatives --config python3 && \
3133
ln -sf opencv4/opencv2 /usr/local/include/opencv2 && \
32-
rm -rf /var/lib/apt/lists/* /root/*
34+
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
3335

3436
RUN mkdir -p /root/.pip && \
3537
echo "[global]" > /root/.pip/pip.conf && \
3638
echo "index-url = https://pypi.python.org/simple" >>/root/.pip/pip.conf && \
3739
echo "trusted-host = pypi.python.org" >>/root/.pip/pip.conf && \
3840
echo "timeout = 120" >>/root/.pip/pip.conf && \
3941
python3 -m pip install --upgrade pip && \
40-
python3 -m pip install --no-cache-dir wheel numpy pyyaml requests opencv-contrib-python pillow && \
42+
python3 -m pip install --no-cache-dir wheel numpy pyyaml requests opencv-python==4.5.5.64 pillow && \
4143
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub | apt-key add - && \
4244
curl -fsSL https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
4345
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \

docker/Dockerfile.cuda.runtime.openeuler

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ADD *.tar.gz /usr/local/
88

99
ARG CUDA_VER
1010
ARG CUDA_VERSION
11+
ARG TF_VERSION
1112
ARG TRT_VERSION
1213
ARG TORCH_VERSION
1314
ARG CUDA_CUDART_VERSION
@@ -48,8 +49,8 @@ RUN if [ "${CUDA_VERSION}" = "10.2" ]; then \
4849
libcudnn8-${dnn_ver} && \
4950
if [ -n "${TF_VERSION}" ]; then \
5051
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
51-
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \
52-
rm -rf /usr/local/include/tensorflow && \
52+
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
53+
cp -af lib/* /usr/local/lib64/ && \
5354
python3 -m pip install --no-cache-dir tensorflow-gpu==2.6.0; \
5455
elif [ -n "${TRT_VERSION}" ]; then \
5556
if [ "${TRT_VERSION}" = "7.1.3.4" ]; then \

docker/Dockerfile.cuda.runtime.ubuntu

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ ARG BASE_IMAGE=ubuntu:18.04
22
FROM ${BASE_IMAGE} as base
33

44
COPY release /opt/release
5+
56
ADD *.tar.gz /usr/local/
67

78
ARG CUDA_VER
89
ARG CUDA_VERSION
10+
ARG TF_VERSION
911
ARG TRT_VERSION
1012
ARG TORCH_VERSION
1113
ARG CUDA_CUDART_VERSION
@@ -15,24 +17,25 @@ ARG NVIDIA_REQUIRE_CUDA
1517
WORKDIR /root
1618

1719
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
20+
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
1821
apt update && apt upgrade -y && \
19-
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
20-
apt install -y dbus systemd systemd-cron iproute2 gnupg2 libfuse2 \
22+
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
23+
apt install -y dbus systemd systemd-cron iproute2 gnupg2 libfuse2 apt-utils \
2124
build-essential bash unzip ffmpeg curl pkg-config ca-certificates libduktape202 \
2225
libssl1.1 libcpprest libswscale4 libavformat57 graphviz libprotobuf-c1 libgtk-3-0 && \
2326
rm -f /usr/bin/python3 /usr/bin/python && \
2427
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 100 && \
2528
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \
2629
update-alternatives --config python3 && \
27-
rm -rf /var/lib/apt/lists/*
30+
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
2831

2932
RUN mkdir -p /root/.pip && \
3033
echo "[global]" > /root/.pip/pip.conf && \
3134
echo "index-url = https://pypi.python.org/simple" >>/root/.pip/pip.conf && \
3235
echo "trusted-host = pypi.python.org" >>/root/.pip/pip.conf && \
3336
echo "timeout = 120" >>/root/.pip/pip.conf && \
3437
python3 -m pip install --upgrade pip && \
35-
python3 -m pip install --no-cache-dir wheel numpy pyyaml requests opencv-contrib-python pillow && \
38+
python3 -m pip install --no-cache-dir wheel numpy pyyaml requests opencv-python==4.5.5.64 pillow && \
3639
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub | apt-key add - && \
3740
curl -fsSL https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
3841
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
@@ -55,6 +58,7 @@ RUN apt update && \
5558
if [ -n "${TF_VERSION}" ]; then \
5659
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
5760
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \
61+
rm -rf /usr/local/include/tensorflow && \
5862
python3 -m pip install --no-cache-dir tensorflow-gpu==2.6.0; \
5963
elif [ -n "${TRT_VERSION}" ]; then \
6064
if [ "${TRT_VERSION}" = "7.1.3.4" ]; then \

0 commit comments

Comments
 (0)