Skip to content

Instantly share code, notes, and snippets.

@dmaasland
Created June 2, 2024 10:12
Show Gist options
  • Save dmaasland/112a92f4bf58f7d2d1273d68746900a0 to your computer and use it in GitHub Desktop.
Save dmaasland/112a92f4bf58f7d2d1273d68746900a0 to your computer and use it in GitHub Desktop.
# Ubuntu 24.04 not yet supported: https://github.com/intel/linux-npu-driver/releaseshttps://github.com/intel/linux-npu-driver/releases
FROM ubuntu:22.04
# Dependencies
RUN : \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
libtbb12 \
python3-venv \
cmake \
build-essential \
lsb-release \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Download debs
ADD https://github.com/intel/linux-npu-driver/releases/download/v1.2.0/intel-driver-compiler-npu_1.2.0.20240404-8553879914_ubuntu22.04_amd64.deb /tmp
ADD https://github.com/intel/linux-npu-driver/releases/download/v1.2.0/intel-fw-npu_1.2.0.20240404-8553879914_ubuntu22.04_amd64.deb /tmp
ADD https://github.com/intel/linux-npu-driver/releases/download/v1.2.0/intel-level-zero-npu_1.2.0.20240404-8553879914_ubuntu22.04_amd64.deb /tmp
ADD https://github.com/oneapi-src/level-zero/releases/download/v1.16.1/level-zero_1.16.1+u22.04_amd64.deb /tmp
# Install
RUN dpkg -i /tmp/*.deb
# Virtualenv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Pip upgrade
RUN pip install --upgrade \
pip \
wheel
# Intel npu acceleration library
RUN --mount=type=cache,target=/root/.cache \
pip install \
intel-npu-acceleration-library==1.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment