|
24 | 24 | # 4. Run opencv_test_cannops. |
25 | 25 | # ./bin/opencv_test_cannops |
26 | 26 |
|
27 | | -FROM ubuntu:20.04 |
| 27 | +FROM openeuler/openeuler:22.03-lts-sp2 |
28 | 28 |
|
29 | | -RUN apt update && \ |
30 | | - DEBIAN_FRONTEND=noninteractive apt install -y \ |
| 29 | +RUN yum install -y \ |
31 | 30 | git \ |
32 | 31 | wget \ |
33 | 32 | gcc \ |
34 | 33 | g++ \ |
35 | 34 | cmake \ |
36 | 35 | 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 |
51 | 38 |
|
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 |
59 | 40 |
|
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 |
63 | 42 |
|
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 |
68 | 48 |
|
69 | 49 | 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 |
70 | 50 | ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest |
|
0 commit comments