我正在尝试使 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