11# Copyright (C) 2024 Intel Corporation
22# SPDX-License-Identifier: Apache-2.0
33
4- FROM openvino/ubuntu22_dev:2024.1 .0
4+ FROM openvino/ubuntu22_dev:2024.5 .0
55
66USER root
7- RUN useradd -m intel
8- WORKDIR /usr/src/app
9- RUN apt-get update && apt-get install -y ffmpeg wget
7+
108# Install dependencies
11- RUN mkdir neo && \
12- cd neo && \
13- wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-core_1.0.17791.9_amd64.deb && \
14- wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-opencl_1.0.17791.9_amd64.deb && \
15- wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-level-zero-gpu-dbgsym_1.6.31294.12_amd64.ddeb && \
16- wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-level-zero-gpu_1.6.31294.12_amd64.deb && \
17- wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-opencl-icd-dbgsym_24.39.31294.12_amd64.ddeb && \
18- wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-opencl-icd_24.39.31294.12_amd64.deb && \
19- wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/libigdgmm12_22.5.2_amd64.deb && \
20- dpkg -i *.deb
21-
22- RUN apt install libtbb12
23- RUN mkdir npu-driver && \
24- cd npu-driver && \
25- wget https://github.com/intel/linux-npu-driver/releases/download/v1.5.1/intel-driver-compiler-npu_1.5.1.20240708-9842236399_ubuntu22.04_amd64.deb && \
26- wget https://github.com/intel/linux-npu-driver/releases/download/v1.5.1/intel-fw-npu_1.5.1.20240708-9842236399_ubuntu22.04_amd64.deb && \
27- wget https://github.com/intel/linux-npu-driver/releases/download/v1.5.1/intel-level-zero-npu_1.5.1.20240708-9842236399_ubuntu22.04_amd64.deb && \
28- dpkg -i *.deb
29-
30- RUN wget https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero_1.17.6+u22.04_amd64.deb && \
31- dpkg -i level-zero*.deb
32- RUN pip install "transformers>=4.35" "torch>=2.1" onnx "git+https://github.com/huggingface/optimum-intel.git" "peft==0.6.2" --extra-index-url https://download.pytorch.org/whl/cpu
33- RUN rm -r *.deb neo npu-driver
34-
35- ARG RENDER_GROUP_ID
36- RUN groupadd -g ${RENDER_GROUP_ID} render
37- COPY requirements.txt .
9+ RUN apt-get update && apt-get install -y ffmpeg \
10+ wget \
11+ gnupg2 \
12+ libtbb12 \
13+ python3.11 \
14+ python3.11-venv
15+
16+ # Install GPU drivers
17+ RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg \
18+ && echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" | tee /etc/apt/sources.list.d/intel-gpu-jammy.list \
19+ && apt update \
20+ && apt-get install -y libze1 \
21+ intel-level-zero-gpu \
22+ intel-opencl-icd \
23+ clinfo \
24+ && rm -rf /var/lib/apt/lists/*
25+
26+ # Install NPU drivers
27+ RUN mkdir /tmp/npu-driver \
28+ && cd /tmp/npu-driver\
29+ && wget https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-driver-compiler-npu_1.10.0.20241107-11729849322_ubuntu22.04_amd64.deb \
30+ && wget https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-fw-npu_1.10.0.20241107-11729849322_ubuntu22.04_amd64.deb \
31+ && wget https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-level-zero-npu_1.10.0.20241107-11729849322_ubuntu22.04_amd64.deb \
32+ && wget https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero_1.17.6+u22.04_amd64.deb \
33+ && dpkg -i *.deb
34+
35+ RUN mkdir -p /usr/src \
36+ && chown -R openvino:openvino /usr/src
37+
38+ USER openvino
39+ WORKDIR /usr/src/app
40+ RUN python3 -m venv /usr/src/.venv
41+ ENV PATH="/usr/src/.venv/bin:$PATH"
42+
43+ # Install python dependencies
44+ COPY --chown=openvino:openvino requirements.txt .
3845RUN python3 -m pip install -r requirements.txt
3946
40- COPY . .
47+ COPY --chown=openvino:openvino server.py .
48+ COPY --chown=openvino:openvino utils.py .
4149
4250HEALTHCHECK --interval=60s --timeout=180s --start-period=5s --retries=3 \
43- CMD wget --no-verbose --no-proxy -O /dev/null --tries=1 http://stt_service:5996/healthcheck || exit 1
51+ CMD wget --no-verbose --no-proxy -O /dev/null --tries=1 http://stt_service:5996/healthcheck || exit 1
0 commit comments