Skip to content

Commit 68a050f

Browse files
committed
Change docker base image to openeuler
Change docker base image to openeuler:22.03-lts-sp2. Make Dockerfile compatible with x86_64 and aarch64.
1 parent c802826 commit 68a050f

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

modules/cannops/Dockerfile

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,27 @@
2424
# 4. Run opencv_test_cannops.
2525
# ./bin/opencv_test_cannops
2626

27-
FROM ubuntu:20.04
27+
FROM openeuler/openeuler:22.03-lts-sp2
2828

29-
RUN apt update && \
30-
DEBIAN_FRONTEND=noninteractive apt install -y \
29+
RUN yum install -y \
3130
git \
3231
wget \
3332
gcc \
3433
g++ \
3534
cmake \
3635
make \
37-
zlib1g \
38-
zlib1g-dev \
39-
openssl \
40-
libsqlite3-dev \
41-
libssl-dev \
42-
libffi-dev \
43-
unzip \
44-
pciutils \
45-
net-tools \
46-
libblas-dev \
47-
gfortran \
48-
patchelf \
49-
libblas3 && \
50-
rm -rf /var/lib/apt/lists/*
36+
python-pip \
37+
python3-devel
5138

52-
# Install Python 3.9
53-
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
54-
bash ~/miniconda.sh -b -p /root/miniconda && \
55-
rm -f ~/miniconda.sh
56-
RUN /root/miniconda/bin/conda create --name opencv -y python=3.9
57-
ENV PATH=/root/miniconda/envs/opencv/bin/:$PATH
58-
RUN pip install numpy sympy decorator scipy attrs
39+
RUN which pip
5940

60-
# Install CANN
61-
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64/common/:/usr/local/Ascend/driver/lib64/driver/:$LD_LIBRARY_PATH \
62-
CANN_TOOLKIT_URL=https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Milan-ASL/Milan-ASL%20V100R001C13SPC702/Ascend-cann-toolkit_7.0.RC1.alpha002_linux-x86_64.run
41+
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy sympy decorator scipy attrs
6342

64-
RUN wget ${CANN_TOOLKIT_URL} && \
65-
chmod +x Ascend-cann-toolkit_7.0.RC1.alpha002_linux-x86_64.run && \
66-
./Ascend-cann-toolkit_7.0.RC1.alpha002_linux-x86_64.run --install && \
67-
rm -f ./Ascend-cann-toolkit_7.0.RC1.alpha002_linux-x86_64.run
43+
# Install CANN
44+
RUN wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Milan-ASL/Milan-ASL%20V100R001C13SPC702/Ascend-cann-toolkit_7.0.RC1.alpha002_linux-"$(uname -i)".run && \
45+
chmod +x Ascend-cann-toolkit_7.0.RC1.alpha002_linux-"$(uname -i)".run && \
46+
./Ascend-cann-toolkit_7.0.RC1.alpha002_linux-"$(uname -i)".run --install && \
47+
rm -f ./Ascend-cann-toolkit_7.0.RC1.alpha002_linux-"$(uname -i)".run
6848

6949
ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64/common:/usr/local/Ascend/driver/lib64/driver:$LD_LIBRARY_PATH:/usr/lib64
7050
ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest

0 commit comments

Comments
 (0)