AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1684878
Accepted
0x90
0x90
Asked: 2021-11-01 16:00:51 +0800 CST2021-11-01 16:00:51 +0800 CST 2021-11-01 16:00:51 +0800 CST

如何在 tiangolo/uwsgi-nginx-flask:python3.10 (debian 10) docker 容器上安装 intel/amd64 OpenCL?

  • 772

我正在尝试使 opencl 在tiangolo/uwsgi-nginx-flask容器中工作。

FROM tiangolo/uwsgi-nginx-flask:python3.10

RUN apt-get update
#RUN apt-get install -y -f libcrypt-dev libssl-dev openssl libgconf2-dev build-essential gcc g++ make dkms libcrypto++

RUN apt-get update && apt-get install -y \
    apt-utils \
    unzip \
    tar \
    curl \
    wget \
    xz-utils \
    alien \
    clinfo \
    software-properties-common \
    ;


ARG DEBIAN_FRONTEND=noninteractive
ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1


RUN sed -e '/focal-updates main restricted/ s/^#*/#/' -i /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y \
  libc6-dev libc6 libc-bin \
  build-essential \
  pkg-config \
  cmake \
  ca-certificates \
  gnupg


RUN apt-get install -y gpg-agent wget
RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
RUN apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'

RUN apt-get update -y
RUN apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1

RUN apt-get install -y libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev

RUN cd /tmp
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
RUN apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
RUN rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB

RUN echo "deb https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list
RUN apt update

RUN apt-get update -y && \
 apt-get install -y --no-install-recommends \
 intel-oneapi-runtime-ccl \
 intel-oneapi-runtime-compilers \
 intel-oneapi-runtime-dal \
 intel-oneapi-runtime-dnnl \
 intel-oneapi-runtime-dpcpp-cpp \
 intel-oneapi-runtime-dpcpp-library \
 intel-oneapi-runtime-fortran \
 intel-oneapi-runtime-ipp \
 intel-oneapi-runtime-ipp-crypto \
 intel-oneapi-runtime-libs \
 intel-oneapi-runtime-mkl \
 intel-oneapi-runtime-mpi \
 intel-oneapi-runtime-opencl \
 intel-oneapi-runtime-openmp \
 intel-oneapi-runtime-tbb \
 intel-oneapi-runtime-vpl

RUN apt-get update -y && apt-get install -y software-properties-common gpg-agent wget
RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
RUN apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'

当我尝试通过以下方式构建上述 Dockerfile 时:

$ docker build -t try . -f ./Dockerfile

我收到以下错误:

 => ERROR [11/22] RUN apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1                                                                                                                     1.9s
------
 > [11/22] RUN apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1:
#15 0.581 Reading package lists...
#15 1.389 Building dependency tree...
#15 1.614 Reading state information...
#15 1.738 Some packages could not be installed. This may mean that you have
#15 1.738 requested an impossible situation or if you are using the unstable
#15 1.738 distribution that some required packages have not yet been created
#15 1.738 or been moved out of Incoming.
#15 1.738 The following information may help to resolve the situation:
#15 1.738
#15 1.738 The following packages have unmet dependencies:
#15 1.844  intel-level-zero-gpu : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed
#15 1.844                         Depends: libgcc-s1 (>= 3.4) but it is not installable
#15 1.844                         Depends: libigdgmm11 (>= 21.2.2+i620~u20.04) but it is not going to be installed
#15 1.844                         Depends: libigc1 (>= 1.0.8517) but it is not going to be installed
#15 1.844                         Depends: libigdfcl1 (>= 1.0.8517) but it is not going to be installed
#15 1.844  intel-media-va-driver-non-free : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed
#15 1.844                                   Depends: libgcc-s1 (>= 3.0) but it is not installable
#15 1.844                                   Depends: libigdgmm11 (>= 21.2.2+i620~u20.04) but it is not going to be installed
#15 1.844  intel-opencl-icd : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed
#15 1.844                     Depends: libgcc-s1 (>= 3.4) but it is not installable
#15 1.844                     Depends: libigdgmm11 (>= 21.2.2+i620~u20.04) but it is not going to be installed
#15 1.844                     Depends: libstdc++6 (>= 9) but 8.3.0-6 is to be installed
#15 1.844                     Depends: libigc1 (>= 1.0.8517) but it is not going to be installed
#15 1.852                     Depends: libigdfcl1 (>= 1.0.8517) but it is not going to be installed
#15 1.852                     Recommends: intel-igc-cm (>= 1.0.1) but it is not going to be installed
#15 1.852  level-zero : Depends: libgcc-s1 (>= 3.0) but it is not installable
#15 1.852  libmfx1 : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed
#15 1.852            Depends: libgcc-s1 (>= 3.0) but it is not installable
#15 1.876 E: Unable to correct problems, you have held broken packages.
------
executor failed running [/bin/sh -c apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1]: exit code: 100

如何解决这种依赖歧义?如果它有助于下划线的 linux 发行版tiangolo/uwsgi-nginx-flask 是:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
debian docker
  • 1 1 个回答
  • 242 Views

1 个回答

  • Voted
  1. Best Answer
    0x90
    2021-11-02T04:33:40+08:002021-11-02T04:33:40+08:00

    使用来自英特尔计算运行时 github 存储库的版本应该可以解决问题。

    FROM tiangolo/uwsgi-nginx-flask:python3.8
    #RUN echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list
    
    RUN apt-get update
    
    RUN apt-get update && apt-get install -y \
        apt-utils \
        unzip \
        tar \
        curl \
        wget \
        xz-utils \
        alien \
        clinfo \
        software-properties-common \
        ;
    
    
    ARG DEBIAN_FRONTEND=noninteractive
    ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1
    
    RUN wget https://github.com/intel/compute-runtime/releases/download/21.13.19438/intel-gmmlib_20.4.1_amd64.deb
    RUN wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.6748/intel-igc-core_1.0.6748_amd64.deb
    RUN wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.6748/intel-igc-opencl_1.0.6748_amd64.deb
    RUN wget https://github.com/intel/compute-runtime/releases/download/21.13.19438/intel-opencl_21.13.19438_amd64.deb
    RUN wget https://github.com/intel/compute-runtime/releases/download/21.13.19438/intel-ocloc_21.13.19438_amd64.deb
    RUN wget https://github.com/intel/compute-runtime/releases/download/21.13.19438/intel-level-zero-gpu_1.0.19438_amd64.deb
    
    RUN dpkg -i *.deb
    
    
    #RUN sed -e '/focal-updates main restricted/ s/^#*/#/' -i /etc/apt/sources.list
    RUN apt-get update -y && apt-get install -y \
      libc6-dev libc6 libc-bin \
      build-essential \
      pkg-config \
      cmake \
      ca-certificates \
      gnupg
    
    
    RUN apt-get install -y gpg-agent wget
    RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
    RUN apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
    
    RUN cd /tmp
    RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
    RUN apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
    RUN rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
    
    RUN echo "deb https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list
    RUN apt update
    
    RUN apt-get update -y && apt-get install -y software-properties-common gpg-agent wget
    RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
    RUN apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
    
    RUN apt-get update -y && \
     apt-get install -y --no-install-recommends \
     intel-oneapi-runtime-ccl \
     intel-oneapi-runtime-compilers \
     intel-oneapi-runtime-dal \
     intel-oneapi-runtime-dnnl \
     intel-oneapi-runtime-dpcpp-cpp \
     intel-oneapi-runtime-dpcpp-library \
     intel-oneapi-runtime-fortran \
     intel-oneapi-runtime-ipp \
     intel-oneapi-runtime-ipp-crypto \
     intel-oneapi-runtime-libs \
     intel-oneapi-runtime-mkl \
     intel-oneapi-runtime-mpi \
     intel-oneapi-runtime-opencl \
     intel-oneapi-runtime-openmp \
     intel-oneapi-runtime-tbb \
     intel-oneapi-runtime-vpl
    
    • 0

相关问题

  • Pixelbook 安装 r-base 依赖项时出现 held broken packages 错误

  • Nginx 为某些文件提供 404

  • 重启 Debian 服务器后目录丢失

  • 以 root 身份运行 docker 容器

  • 在 Windows 上与 Docker 守护进程通信

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve