diff --git a/comps/dataprep/src/Dockerfile b/comps/dataprep/src/Dockerfile index cf6dd45e73..3aaf0dfaab 100644 --- a/comps/dataprep/src/Dockerfile +++ b/comps/dataprep/src/Dockerfile @@ -10,13 +10,13 @@ ARG ARCH="cpu" RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ default-jre \ + libcairo2 \ libgl1-mesa-glx \ libjemalloc-dev \ + libpq-dev \ libreoffice \ poppler-utils \ tesseract-ocr \ - libpq-dev \ - libcairo2 \ wget # Install ffmpeg static build diff --git a/comps/finetuning/src/Dockerfile.xtune b/comps/finetuning/src/Dockerfile.xtune index 9eede5dd9e..c12da0ff6d 100644 --- a/comps/finetuning/src/Dockerfile.xtune +++ b/comps/finetuning/src/Dockerfile.xtune @@ -17,29 +17,28 @@ RUN useradd -m -s /bin/bash user && \ RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ tee /etc/apt/sources.list.d/intel-gpu-jammy.list &&\ - apt update -y &&\ - apt install -y \ - libze-intel-gpu1 libze1 intel-opencl-icd clinfo \ - libze-dev intel-ocloc \ + apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ + clinfo \ intel-level-zero-gpu-raytracing \ - vim \ + intel-ocloc \ + intel-opencl-icd \ + libze1 \ + libze-dev \ + libze-intel-gpu1 \ rsync COPY comps /home/user/comps - RUN chown -R user /home/user/comps/finetuning ENV PATH=$PATH:/home/user/.local/bin RUN cd /home/user/comps/finetuning/src/integrations/xtune && git config --global user.name "test" && git config --global user.email "test" && bash prepare_xtune.sh -RUN python -m pip install --upgrade pip setuptools peft && \ - python -m pip install -r /home/user/comps/finetuning/src/requirements.txt +RUN python -m pip install --no-cache-dir --upgrade pip setuptools peft && \ + python -m pip install --no-cache-dir -r /home/user/comps/finetuning/src/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user - - WORKDIR /home/user/comps/finetuning/src RUN echo PKGPATH=$(python3 -c "import pkg_resources; print(pkg_resources.get_distribution('oneccl-bind-pt').location)") >> run.sh && \ diff --git a/comps/image2image/src/Dockerfile b/comps/image2image/src/Dockerfile index 88c7c9c2fe..22c7900231 100644 --- a/comps/image2image/src/Dockerfile +++ b/comps/image2image/src/Dockerfile @@ -11,7 +11,7 @@ ARG ARCH="cpu" COPY comps /home/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/comps/image2image/src/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home diff --git a/comps/image2video/src/Dockerfile b/comps/image2video/src/Dockerfile index 96887dd9fb..297734a79a 100644 --- a/comps/image2video/src/Dockerfile +++ b/comps/image2video/src/Dockerfile @@ -10,13 +10,20 @@ ARG ARCH="cpu" COPY comps /home/comps -RUN apt-get update && apt-get install python3-opencv -y && \ - pip install --no-cache-dir --upgrade pip setuptools && \ +RUN useradd -m -s /bin/bash user && \ + mkdir -p /home/user && \ + chown -R user /home/user/ + +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing python3-opencv + +RUN pip install --no-cache-dir --upgrade pip setuptools && \ if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/comps/image2video/src/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home +USER user + WORKDIR /home/comps/image2video/src -ENTRYPOINT ["python", "opea_image2video_microservice.py"] \ No newline at end of file +ENTRYPOINT ["python", "opea_image2video_microservice.py"] diff --git a/comps/llms/src/text-generation/Dockerfile.intel_hpu_phi4 b/comps/llms/src/text-generation/Dockerfile.intel_hpu_phi4 index 4151a92a41..71dcbdde1a 100644 --- a/comps/llms/src/text-generation/Dockerfile.intel_hpu_phi4 +++ b/comps/llms/src/text-generation/Dockerfile.intel_hpu_phi4 @@ -24,9 +24,9 @@ RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir --upgrade-strategy eager optimum[habana] && \ pip install --no-cache-dir git+https://github.com/HabanaAI/DeepSpeed.git@1.19.0 -RUN pip install git+https://github.com/huggingface/optimum-habana.git@transformers_future && \ +RUN pip install --no-cache-dir git+https://github.com/huggingface/optimum-habana.git@transformers_future && \ cd /home/user/comps/llms/src/text-generation/ && pip install --no-cache-dir -r requirements.txt && \ - pip install soundfile peft backoff + pip install --no-cache-dir soundfile peft backoff ENV PYTHONPATH=/root:/home/user ENV HABANA_LOGS=/home/user/logs diff --git a/comps/rerankings/src/Dockerfile b/comps/rerankings/src/Dockerfile index efa2475c1b..b374834cd1 100644 --- a/comps/rerankings/src/Dockerfile +++ b/comps/rerankings/src/Dockerfile @@ -19,22 +19,21 @@ RUN useradd -m -s /bin/bash user && \ COPY comps/rerankings/src/requirements* /home/user/comps/rerankings/src/ +RUN pip install --no-cache-dir --upgrade pip setuptools + RUN if [ ${ARCH} = "cpu" ]; then \ pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; \ -fi && \ -if [ ${SERVICE} = "videoqna" ]; then \ - pip install --no-cache-dir --upgrade pip setuptools && \ - pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ -elif [ ${SERVICE} = "all" ]; then \ - git clone https://github.com/IntelLabs/fastRAG.git /home/user/fastRAG && \ - cd /home/user/fastRAG && \ - pip install --no-cache-dir --upgrade pip setuptools && \ - pip install --no-cache-dir . && \ - pip install --no-cache-dir .[intel] && \ - pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ -fi && \ -pip install --no-cache-dir --upgrade pip setuptools && \ -pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements.txt; + fi && \ + if [ ${SERVICE} = "videoqna" ]; then \ + pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ + elif [ ${SERVICE} = "all" ]; then \ + git clone https://github.com/IntelLabs/fastRAG.git /home/user/fastRAG && \ + cd /home/user/fastRAG && \ + pip install --no-cache-dir . && \ + pip install --no-cache-dir .[intel] && \ + pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ + fi && \ + pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements.txt; COPY comps /home/user/comps ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/retrievers/src/Dockerfile b/comps/retrievers/src/Dockerfile index 733e174445..7f4580d361 100644 --- a/comps/retrievers/src/Dockerfile +++ b/comps/retrievers/src/Dockerfile @@ -6,11 +6,10 @@ FROM python:3.11-slim ARG ARCH="cpu" RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ - libgl1-mesa-glx \ - libjemalloc-dev \ libcairo2 \ + libgl1-mesa-glx \ libglib2.0-0 \ - vim + libjemalloc-dev RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ diff --git a/comps/text2graph/src/Dockerfile b/comps/text2graph/src/Dockerfile index 3f26b79540..0f9bfaf1b1 100644 --- a/comps/text2graph/src/Dockerfile +++ b/comps/text2graph/src/Dockerfile @@ -25,9 +25,6 @@ RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir -r /home/user/comps/text2graph/src/requirements.txt; \ fi -ENV https_proxy=${https_proxy} -ENV http_proxy=${http_proxy} -ENV no_proxy=${no_proxy} ENV LLM_ID=${LLM_ID:-"Babelscape/rebel-large"} ENV SPAN_LENGTH=${SPAN_LENGTH:-"1024"} ENV OVERLAP=${OVERLAP:-"100"} diff --git a/comps/third_parties/bridgetower/src/Dockerfile b/comps/third_parties/bridgetower/src/Dockerfile index 1d80f2f0fb..53090be095 100644 --- a/comps/third_parties/bridgetower/src/Dockerfile +++ b/comps/third_parties/bridgetower/src/Dockerfile @@ -5,7 +5,8 @@ FROM python:3.10-slim RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ chown -R user /home/user/ -RUN apt-get update && apt-get install -y curl + +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing curl # Set environment variables ENV LANG=en_US.UTF-8 diff --git a/comps/third_parties/bridgetower/src/Dockerfile.intel_hpu b/comps/third_parties/bridgetower/src/Dockerfile.intel_hpu index 3350b7001d..889e49d6b4 100644 --- a/comps/third_parties/bridgetower/src/Dockerfile.intel_hpu +++ b/comps/third_parties/bridgetower/src/Dockerfile.intel_hpu @@ -8,7 +8,7 @@ RUN useradd -m -s /bin/bash user && \ chown -R user /home/user/ RUN rm -rf /etc/ssh/ssh_host* -RUN apt-get update && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing curl # Set environment variables ENV LANG=en_US.UTF-8 diff --git a/comps/third_parties/gpt-sovits/src/Dockerfile b/comps/third_parties/gpt-sovits/src/Dockerfile index 86ac5a47f5..e2be145ed4 100644 --- a/comps/third_parties/gpt-sovits/src/Dockerfile +++ b/comps/third_parties/gpt-sovits/src/Dockerfile @@ -7,9 +7,16 @@ RUN useradd -m -s /bin/bash user && \ chown -R user /home/user/ # Install system dependencies -RUN apt-get update && \ - apt-get install -y ffmpeg git-lfs git wget vim build-essential numactl && \ - apt-get install -y libomp-dev google-perftools curl && \ +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + build-essential \ + curl \ + ffmpeg \ + git \ + git-lfs \ + google-perftools \ + libomp-dev \ + numactl \ + wget && \ pip install --upgrade pip ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libiomp5.so:/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 diff --git a/comps/third_parties/ipex/src/Dockerfile b/comps/third_parties/ipex/src/Dockerfile index a5d807da7d..c932a09fce 100644 --- a/comps/third_parties/ipex/src/Dockerfile +++ b/comps/third_parties/ipex/src/Dockerfile @@ -5,21 +5,19 @@ ARG BASE_IMAGE=ubuntu:22.04 FROM ${BASE_IMAGE} AS base -RUN if [ -f /etc/apt/apt.conf.d/proxy.conf ]; then rm /etc/apt/apt.conf.d/proxy.conf; fi && \ - if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::Proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf.d/proxy.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::Proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf.d/proxy.conf; fi -RUN apt update && \ - apt full-upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \ + +RUN apt-get update && \ + apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --fix-missing \ ca-certificates \ - git \ curl \ - wget \ - vim \ - numactl \ - gcc-12 \ g++-12 \ + gcc-12 \ + git \ make + numactl \ + wget + RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 && \ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 && \ @@ -42,14 +40,14 @@ RUN . ~/miniforge3/bin/activate && conda create -y -n compile_py310 python=3.10 unset CC && unset CXX FROM base AS deploy -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --fix-missing \ google-perftools \ - openssh-server \ - net-tools && \ - apt clean && \ + net-tools \ + openssh-server && \ + apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - if [ -f /etc/apt/apt.conf.d/proxy.conf ]; then rm /etc/apt/apt.conf.d/proxy.conf; fi + COPY --from=dev /root/intel-extension-for-pytorch/examples/cpu/llm ./llm COPY --from=dev /root/intel-extension-for-pytorch/tools/get_libstdcpp_lib.sh ./llm/tools RUN . ~/miniforge3/bin/activate && conda create -y -n py310 python=3.10 && conda activate py310 && \ @@ -60,7 +58,7 @@ RUN . ~/miniforge3/bin/activate && conda create -y -n py310 python=3.10 && conda mv ./oneCCL_release /opt/oneCCL && \ chown -R root:root /opt/oneCCL && \ sed -i "s|ONECCL_PATH=.*|ONECCL_PATH=/opt/oneCCL|" ./tools/env_activate.sh && \ - pip install backoff fastapi uvicorn + pip install --no-cache-dir backoff fastapi uvicorn ARG PORT_SSH=22 RUN mkdir /var/run/sshd && \ sed -i "s/#Port.*/Port ${PORT_SSH}/" /etc/ssh/sshd_config && \ @@ -74,4 +72,3 @@ COPY ./comps/third_parties/ipex/src/openai_protocol.py /root COPY ./comps/third_parties/ipex/src/entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] - diff --git a/comps/third_parties/llama-vision/src/Dockerfile b/comps/third_parties/llama-vision/src/Dockerfile index 4e2b24b7e7..cada67a99f 100644 --- a/comps/third_parties/llama-vision/src/Dockerfile +++ b/comps/third_parties/llama-vision/src/Dockerfile @@ -7,10 +7,10 @@ FROM vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installe ENV LANG=en_US.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ git-lfs \ libgl1-mesa-glx \ - libjemalloc-dev \ - curl + libjemalloc-dev RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ diff --git a/comps/third_parties/llama-vision/src/Dockerfile.guard b/comps/third_parties/llama-vision/src/Dockerfile.guard index fb7be1cf96..2e67ac80d8 100644 --- a/comps/third_parties/llama-vision/src/Dockerfile.guard +++ b/comps/third_parties/llama-vision/src/Dockerfile.guard @@ -7,10 +7,10 @@ FROM vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installe ENV LANG=en_US.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ git-lfs \ libgl1-mesa-glx \ - libjemalloc-dev \ - curl + libjemalloc-dev RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ diff --git a/comps/third_parties/llama-vision/src/Dockerfile.tp b/comps/third_parties/llama-vision/src/Dockerfile.tp index 2471d3dcf7..52cc7f9dc5 100644 --- a/comps/third_parties/llama-vision/src/Dockerfile.tp +++ b/comps/third_parties/llama-vision/src/Dockerfile.tp @@ -7,10 +7,10 @@ FROM vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installe ENV LANG=en_US.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ git-lfs \ libgl1-mesa-glx \ - libjemalloc-dev \ - curl + libjemalloc-dev RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ diff --git a/comps/third_parties/llava/src/Dockerfile b/comps/third_parties/llava/src/Dockerfile index c557f185c1..83e61a96b2 100644 --- a/comps/third_parties/llava/src/Dockerfile +++ b/comps/third_parties/llava/src/Dockerfile @@ -7,8 +7,7 @@ RUN useradd -m -s /bin/bash user && \ chown -R user /home/user/ # Install system dependencies -RUN apt-get update \ - && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing curl # Set environment variables ENV LANG=en_US.UTF-8 diff --git a/comps/third_parties/llava/src/Dockerfile.intel_hpu b/comps/third_parties/llava/src/Dockerfile.intel_hpu index 3156c3e155..d61d619e0a 100644 --- a/comps/third_parties/llava/src/Dockerfile.intel_hpu +++ b/comps/third_parties/llava/src/Dockerfile.intel_hpu @@ -8,8 +8,7 @@ RUN useradd -m -s /bin/bash user && \ chown -R user /home/user/ # Install system dependencies -RUN apt-get update \ - && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing curl RUN rm -rf /etc/ssh/ssh_host* diff --git a/comps/third_parties/pathway/src/Dockerfile b/comps/third_parties/pathway/src/Dockerfile index 59c68c31dc..97ea38cc7f 100644 --- a/comps/third_parties/pathway/src/Dockerfile +++ b/comps/third_parties/pathway/src/Dockerfile @@ -7,10 +7,10 @@ ENV DOCKER_BUILDKIT=1 ENV PYTHONUNBUFFERED=1 ARG ARCH="cpu" -RUN apt-get update && apt-get install -y \ - poppler-utils \ - libreoffice \ +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ libmagic-dev \ + libreoffice \ + poppler-utils \ && rm -rf /var/lib/apt/lists/* WORKDIR /app diff --git a/comps/third_parties/predictionguard/src/Dockerfile b/comps/third_parties/predictionguard/src/Dockerfile index d620b004d6..b59d5383ec 100644 --- a/comps/third_parties/predictionguard/src/Dockerfile +++ b/comps/third_parties/predictionguard/src/Dockerfile @@ -9,8 +9,7 @@ ENV LANG=en_US.UTF-8 COPY comps /home/user/comps # Install system dependencies -RUN apt-get update \ - && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing curl RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir -r /home/user/comps/third_parties/predictionguard/src/requirements.txt diff --git a/comps/third_parties/speecht5/src/Dockerfile b/comps/third_parties/speecht5/src/Dockerfile index b712aa36ad..a66b2f6ec6 100644 --- a/comps/third_parties/speecht5/src/Dockerfile +++ b/comps/third_parties/speecht5/src/Dockerfile @@ -12,9 +12,9 @@ ENV PYTHONPATH=/home/user ARG ARCH=cpu # Install system dependencies -RUN apt-get update \ - && apt-get install -y ffmpeg \ - && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + ffmpeg COPY --chown=user:user comps /home/user/comps diff --git a/comps/third_parties/speecht5/src/Dockerfile.intel_hpu b/comps/third_parties/speecht5/src/Dockerfile.intel_hpu index 994c252077..ecbf2966c0 100644 --- a/comps/third_parties/speecht5/src/Dockerfile.intel_hpu +++ b/comps/third_parties/speecht5/src/Dockerfile.intel_hpu @@ -14,9 +14,9 @@ ENV PYTHONPATH=/home/user:/usr/lib/habanalabs/:/optimum-habana ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH # Install system dependencies -RUN apt-get update \ - && apt-get install -y ffmpeg \ - && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + ffmpeg COPY --chown=user:user comps /home/user/comps diff --git a/comps/third_parties/video-llama/src/Dockerfile b/comps/third_parties/video-llama/src/Dockerfile index dfaf292b24..d9ca1fc011 100644 --- a/comps/third_parties/video-llama/src/Dockerfile +++ b/comps/third_parties/video-llama/src/Dockerfile @@ -6,7 +6,9 @@ FROM python:3.9-slim ENV LANG=C.UTF-8 RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ - git git-lfs curl && \ + curl \ + git \ + git-lfs && \ git lfs install RUN useradd -m -s /bin/bash user && \ diff --git a/comps/third_parties/vllm/src/Dockerfile.intel_gpu b/comps/third_parties/vllm/src/Dockerfile.intel_gpu index bbcedcdf69..2d7f933c09 100644 --- a/comps/third_parties/vllm/src/Dockerfile.intel_gpu +++ b/comps/third_parties/vllm/src/Dockerfile.intel_gpu @@ -6,21 +6,45 @@ FROM ubuntu:22.04 AS dev RUN apt-get update -y && \ - apt-get install -y \ - git python3-pip \ - ffmpeg libsm6 libxext6 libgl1 \ - gpg-agent wget + apt-get install -y --no-install-recommends --fix-missing \ + ffmpeg \ + git \ + gnupg2 \ + gpg-agent \ + libgl1 \ + libsm6 \ + libxext6 \ + python3-pip \ + wget RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \ - tee /etc/apt/sources.list.d/intel-gpu-jammy.list &&\ - apt update -y &&\ - apt install -y \ - intel-opencl-icd intel-level-zero-gpu level-zero \ - intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ - libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri \ - libglapi-mesa libgles2-mesa-dev libglx-mesa0 libigdgmm12 libxatracker2 mesa-va-drivers \ - mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all vainfo hwinfo clinfo + tee /etc/apt/sources.list.d/intel-gpu-jammy.list && \ + apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ + clinfo \ + hwinfo \ + intel-level-zero-gpu \ + intel-media-va-driver-non-free \ + intel-opencl-icd \ + level-zero \ + libegl1-mesa \ + libegl1-mesa-dev \ + libegl-mesa0 \ + libgbm1 \ + libgl1-mesa-dev \ + libgl1-mesa-dri \ + libglapi-mesa \ + libgles2-mesa-dev \ + libglx-mesa0 \ + libigdgmm12 \ + libmfx1 libmfxgen1 \ + libvpl2 \ + libxatracker2 \ + mesa-va-drivers \ + mesa-vdpau-drivers \ + mesa-vulkan-drivers \ + va-driver-all \ + vainfo WORKDIR /workspace @@ -28,13 +52,11 @@ RUN git clone -b v0.6.6.post1 https://github.com/vllm-project/vllm.git RUN python3 -m pip install -U pip # install build requirements -RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt +RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install --no-cache-dir -r /workspace/vllm/requirements-build.txt # build vLLM with OpenVINO backend -RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" VLLM_TARGET_DEVICE="openvino" python3 -m pip install /workspace/vllm/ +RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" VLLM_TARGET_DEVICE="openvino" python3 -m pip install --no-cache-dir /workspace/vllm/ #COPY examples/ /workspace/vllm/examples #COPY benchmarks/ /workspace/vllm/benchmarks - CMD ["/bin/bash"] - diff --git a/comps/third_parties/wav2lip/src/Dockerfile b/comps/third_parties/wav2lip/src/Dockerfile index 532aff33f8..fcfbd977bb 100644 --- a/comps/third_parties/wav2lip/src/Dockerfile +++ b/comps/third_parties/wav2lip/src/Dockerfile @@ -11,15 +11,15 @@ ENV PYTHON=/usr/bin/python3.11 # Install dependencies RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ - yasm \ build-essential \ - pkg-config \ - libx264-dev \ git \ - nasm \ - wget \ libgl1-mesa-glx \ libglib2.0-0 \ + libx264-dev \ + nasm \ + pkg-config \ + wget \ + yasm \ && rm -rf /var/lib/apt/lists/* # Install GenAIComps @@ -40,12 +40,12 @@ RUN chmod +x $(which ffmpeg) RUN python3 -m pip install --upgrade pip # Install Wav2Lip from pip -RUN pip install --no-deps Wav2Lipy +RUN pip install --no-cache-dir --no-deps Wav2Lipy RUN rm /usr/local/lib/python3.11/site-packages/Wav2Lip/__init__.py && touch /usr/local/lib/python3.11/site-packages/Wav2Lip/__init__.py ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.11/site-packages/Wav2Lip" # Install GFPGAN from pip -RUN pip install --no-deps gfpgan +RUN pip install --no-cache-dir --no-deps gfpgan RUN touch /usr/local/lib/python3.11/site-packages/gfpgan/__init__.py ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.11/site-packages/gfpgan" @@ -54,7 +54,7 @@ WORKDIR /usr/local/lib/python3.11/site-packages # Install pip dependencies RUN pip install --no-cache-dir --upgrade pip setuptools && \ - pip install -r /home/user/comps/animation/src/requirements.txt + pip install --no-cache-dir -r /home/user/comps/animation/src/requirements.txt # Custom patches # Modify the degradations.py file to import rgb_to_grayscale from torchvision.transforms.functional diff --git a/comps/third_parties/wav2lip/src/Dockerfile.intel_hpu b/comps/third_parties/wav2lip/src/Dockerfile.intel_hpu index e2ff4e73b1..8a0caec354 100644 --- a/comps/third_parties/wav2lip/src/Dockerfile.intel_hpu +++ b/comps/third_parties/wav2lip/src/Dockerfile.intel_hpu @@ -9,12 +9,12 @@ ENV PYTHON=/usr/bin/python3.10 # Install dependencies RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ - yasm \ build-essential \ + libx264-dev \ + nasm \ pkg-config \ - libx264-dev -RUN apt-get install -y nasm -RUN rm -rf /var/lib/apt/lists/* + yasm && \ + rm -rf /var/lib/apt/lists/* # Install GenAIComps RUN mkdir -p /home/user/comps @@ -34,12 +34,12 @@ RUN chmod +x $(which ffmpeg) RUN python3 -m pip install --upgrade pip # Install Wav2Lip from pip -RUN pip install --no-deps Wav2Lipy +RUN pip install --no-cache-dir --no-deps Wav2Lipy RUN rm /usr/local/lib/python3.10/dist-packages/Wav2Lip/__init__.py && touch /usr/local/lib/python3.10/dist-packages/Wav2Lip/__init__.py ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.10/dist-packages/Wav2Lip" # Install GFPGAN from pip -RUN pip install --no-deps gfpgan +RUN pip install --no-cache-dir --no-deps gfpgan RUN touch /usr/local/lib/python3.10/dist-packages/gfpgan/__init__.py ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.10/dist-packages/gfpgan" @@ -47,7 +47,7 @@ ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.10/dist-packages/gfpgan" WORKDIR /usr/local/lib/python3.10/dist-packages # Install pip dependencies -RUN pip install -r /home/user/comps/animation/src/requirements.txt +RUN pip install --no-cache-dir -r /home/user/comps/animation/src/requirements.txt # Custom patches # Modify the degradations.py file to import rgb_to_grayscale from torchvision.transforms.functional diff --git a/comps/third_parties/whisper/src/Dockerfile b/comps/third_parties/whisper/src/Dockerfile index c1d206801f..cf81ce176d 100644 --- a/comps/third_parties/whisper/src/Dockerfile +++ b/comps/third_parties/whisper/src/Dockerfile @@ -12,8 +12,9 @@ ENV LANG=en_US.UTF-8 ARG ARCH=cpu # Install system dependencies -RUN apt-get update \ - && apt-get install -y ffmpeg curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + ffmpeg COPY --chown=user:user comps /home/user/comps diff --git a/comps/third_parties/whisper/src/Dockerfile.intel_hpu b/comps/third_parties/whisper/src/Dockerfile.intel_hpu index 919ff701d1..3b7c02280f 100644 --- a/comps/third_parties/whisper/src/Dockerfile.intel_hpu +++ b/comps/third_parties/whisper/src/Dockerfile.intel_hpu @@ -14,8 +14,9 @@ ENV PYTHONPATH=/home/user:/usr/lib/habanalabs/:/optimum-habana ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH # Install system dependencies -RUN apt-get update \ - && apt-get install -y ffmpeg curl +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + ffmpeg COPY --chown=user:user comps /home/user/comps @@ -23,7 +24,7 @@ COPY --chown=user:user comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir -r /home/user/comps/asr/src/requirements.txt && \ pip install --no-cache-dir optimum[habana] && \ - pip install git+https://github.com/huggingface/optimum-habana.git@transformers_future && \ + pip install --cache-dir git+https://github.com/huggingface/optimum-habana.git@transformers_future && \ pip install --no-cache-dir --upgrade Jinja2 ENV PYTHONPATH=$PYTHONPATH:/home/users diff --git a/comps/web_retrievers/src/Dockerfile b/comps/web_retrievers/src/Dockerfile index d9e1ded610..1e93ac1b76 100644 --- a/comps/web_retrievers/src/Dockerfile +++ b/comps/web_retrievers/src/Dockerfile @@ -10,9 +10,9 @@ RUN useradd -m -s /bin/bash user && \ chown -R user /home/user/ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ + curl \ libgl1-mesa-glx \ - libjemalloc-dev \ - curl + libjemalloc-dev COPY comps /home/user/comps