ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:2b3b5254f38a790d40e31cb26155609f7fc99ef7bc99eae1e0d67fa9ae605f77 in / |
CMD ["/bin/bash"] |
COPY third-party-programs.txt / # buildkit |
RUN /bin/sh -c apt-get update && apt-get upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl ca-certificates gpg-agent software-properties-common && rm -rf /var/lib/apt/lists/* # buildkit |
RUN /bin/sh -c curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | gpg --dearmor | tee /usr/share/keyrings/intel-oneapi-archive-keyring.gpg # buildkit |
RUN /bin/sh -c echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " > /etc/apt/sources.list.d/oneAPI.list # buildkit |
RUN /bin/sh -c apt-get update && apt-get upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl ca-certificates gpg-agent software-properties-common && rm -rf /var/lib/apt/lists/* # buildkit |
RUN /bin/sh -c curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor | tee /usr/share/keyrings/intel-graphics-archive-keyring.gpg # buildkit |
RUN /bin/sh -c echo "deb [signed-by=/usr/share/keyrings/intel-graphics-archive-keyring.gpg arch=amd64] https://repositories.intel.com/gpu/ubuntu jammy unified" > /etc/apt/sources.list.d/intel-graphics.list # buildkit |
RUN /bin/sh -c apt-get update && apt-get upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates build-essential pkg-config gnupg libarchive13 openssh-server openssh-client wget net-tools git cmake intel-basekit intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev && rm -rf /var/lib/apt/lists/* # buildkit |
ENV LANG=C.UTF-8 |
ENV ACL_BOARD_VENDOR_PATH=/opt/Intel/OpenCLFPGA/oneAPI/Boards |
ENV ADVISOR_2024_DIR=/opt/intel/oneapi/advisor/2024.0 |
ENV APM=/opt/intel/oneapi/advisor/2024.0/perfmodels |
ENV CCL_CONFIGURATION=cpu_gpu_dpcpp |
ENV CCL_CONFIGURATION_PATH= |
ENV CCL_ROOT=/opt/intel/oneapi/ccl/2021.11 |
ENV CLASSPATH=/opt/intel/oneapi/mpi/2021.11/share/java/mpi.jar |
ENV CMAKE_PREFIX_PATH=/opt/intel/oneapi/tbb/2021.11/env/..:/opt/intel/oneapi/mkl/2024.0/lib/cmake:/opt/intel/oneapi/ipp/2021.10/lib/cmake/ipp:/opt/intel/oneapi/dpl/2022.3/lib/cmake/oneDPL:/opt/intel/oneapi/dnnl/2024.0/lib/cmake:/opt/intel/oneapi/dal/2024.0:/opt/intel/oneapi/compiler/2024.0 |
ENV CMPLR_ROOT=/opt/intel/oneapi/compiler/2024.0 |
ENV CPATH=/opt/intel/oneapi/tbb/2021.11/env/../include:/opt/intel/oneapi/mpi/2021.11/include:/opt/intel/oneapi/mkl/2024.0/include:/opt/intel/oneapi/ippcp/2021.9/include:/opt/intel/oneapi/ipp/2021.10/include:/opt/intel/oneapi/dpl/2022.3/include:/opt/intel/oneapi/dpcpp-ct/2024.0/include:/opt/intel/oneapi/dnnl/2024.0/include:/opt/intel/oneapi/dev-utilities/2024.0/include:/opt/intel/oneapi/dal/2024.0/include/dal:/opt/intel/oneapi/compiler/2024.0/opt/oclfpga/include:/opt/intel/oneapi/ccl/2021.11/include |
ENV DALROOT=/opt/intel/oneapi/dal/2024.0 |
ENV DAL_MAJOR_BINARY=2 |
ENV DAL_MINOR_BINARY=0 |
ENV DIAGUTIL_PATH=/opt/intel/oneapi/dpcpp-ct/2024.0/etc/dpct/sys_check/sys_check.sh:/opt/intel/oneapi/debugger/2024.0/etc/debugger/sys_check/sys_check.py:/opt/intel/oneapi/compiler/2024.0/etc/compiler/sys_check/sys_check.sh |
ENV DNNLROOT=/opt/intel/oneapi/dnnl/2024.0 |
ENV DPL_ROOT=/opt/intel/oneapi/dpl/2022.3 |
ENV FI_PROVIDER_PATH=/opt/intel/oneapi/mpi/2021.11/opt/mpi/libfabric/lib/prov:/usr/lib/x86_64-linux-gnu/libfabric |
ENV FPGA_VARS_ARGS= |
ENV FPGA_VARS_DIR=/opt/intel/oneapi/compiler/2024.0/opt/oclfpga |
ENV GDB_INFO=/opt/intel/oneapi/debugger/2024.0/share/info/ |
ENV INFOPATH=/opt/intel/oneapi/debugger/2024.0/opt/debugger/lib |
ENV INTELFPGAOCLSDKROOT=/opt/intel/oneapi/compiler/2024.0/opt/oclfpga |
ENV INTEL_PYTHONHOME=/opt/intel/oneapi/debugger/2024.0/opt/debugger |
ENV IPPCP_TARGET_ARCH=intel64 |
ENV IPPCRYPTOROOT=/opt/intel/oneapi/ippcp/2021.9 |
ENV IPPROOT=/opt/intel/oneapi/ipp/2021.10 |
ENV IPP_TARGET_ARCH=intel64 |
ENV I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.11 |
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/tbb/2021.11/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/2021.11/opt/mpi/libfabric/lib:/opt/intel/oneapi/mpi/2021.11/lib:/opt/intel/oneapi/mkl/2024.0/lib:/opt/intel/oneapi/ippcp/2021.9/lib/:/opt/intel/oneapi/ipp/2021.10/lib:/opt/intel/oneapi/dpl/2022.3/lib:/opt/intel/oneapi/dnnl/2024.0/lib:/opt/intel/oneapi/debugger/2024.0/opt/debugger/lib:/opt/intel/oneapi/dal/2024.0/lib:/opt/intel/oneapi/compiler/2024.0/opt/oclfpga/host/linux64/lib:/opt/intel/oneapi/compiler/2024.0/opt/compiler/lib:/opt/intel/oneapi/compiler/2024.0/lib:/opt/intel/oneapi/ccl/2021.11/lib/ |
ENV LIBRARY_PATH=/opt/intel/oneapi/tbb/2021.11/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/2021.11/lib:/opt/intel/oneapi/mkl/2024.0/lib/:/opt/intel/oneapi/ippcp/2021.9/lib/:/opt/intel/oneapi/ipp/2021.10/lib:/opt/intel/oneapi/dpl/2022.3/lib:/opt/intel/oneapi/dnnl/2024.0/lib:/opt/intel/oneapi/dal/2024.0/lib:/opt/intel/oneapi/compiler/2024.0/lib:/opt/intel/oneapi/ccl/2021.11/lib/ |
ENV MANPATH=/opt/intel/oneapi/mpi/2021.11/share/man:/opt/intel/oneapi/debugger/2024.0/share/man:/opt/intel/oneapi/compiler/2024.0/documentation/en/man/common: |
ENV MKLROOT=/opt/intel/oneapi/mkl/2024.0 |
ENV NLSPATH=/opt/intel/oneapi/mkl/2024.0/share/locale/%l_%t/%N:/opt/intel/oneapi/compiler/2024.0/lib/locale/%l_%t/%N |
ENV OCL_ICD_FILENAMES=libintelocl_emu.so:libalteracl.so:/opt/intel/oneapi/compiler/2024.0/lib/libintelocl.so |
ENV ONEAPI_ROOT=/opt/intel/oneapi |
ENV PATH=/opt/intel/oneapi/vtune/2024.0/bin64:/opt/intel/oneapi/mpi/2021.11/opt/mpi/libfabric/bin:/opt/intel/oneapi/mpi/2021.11/bin:/opt/intel/oneapi/mkl/2024.0/bin/:/opt/intel/oneapi/dpcpp-ct/2024.0/bin:/opt/intel/oneapi/dev-utilities/2024.0/bin:/opt/intel/oneapi/debugger/2024.0/opt/debugger/bin:/opt/intel/oneapi/compiler/2024.0/opt/oclfpga/bin:/opt/intel/oneapi/compiler/2024.0/bin:/opt/intel/oneapi/advisor/2024.0/bin64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ENV PKG_CONFIG_PATH=/opt/intel/oneapi/vtune/2024.0/include/pkgconfig/lib64:/opt/intel/oneapi/tbb/2021.11/env/../lib/pkgconfig:/opt/intel/oneapi/mpi/2021.11/lib/pkgconfig:/opt/intel/oneapi/mkl/2024.0/lib/pkgconfig:/opt/intel/oneapi/ippcp/2021.9/lib/pkgconfig:/opt/intel/oneapi/dpl/2022.3/lib/pkgconfig:/opt/intel/oneapi/dnnl/2024.0/lib/pkgconfig:/opt/intel/oneapi/dal/2024.0/lib/pkgconfig:/opt/intel/oneapi/compiler/2024.0/lib/pkgconfig:/opt/intel/oneapi/ccl/2021.11/lib/pkgconfig/:/opt/intel/oneapi/advisor/2024.0/include/pkgconfig/lib64: |
ENV PYTHONPATH=/opt/intel/oneapi/advisor/2024.0/pythonapi |
ENV SETVARS_COMPLETED=1 |
ENV TBBROOT=/opt/intel/oneapi/tbb/2021.11/env/.. |
ENV VTUNE_PROFILER_2024_DIR=/opt/intel/oneapi/vtune/2024.0 |
ENV VTUNE_PROFILER_DIR=/opt/intel/oneapi/vtune/2024.0 |
ARG http_proxy |
ARG https_proxy |
ENV TZ=Asia/Shanghai |
ENV PYTHONUNBUFFERED=1 |
ENV SYCL_CACHE_PERSISTENT=1 |
ARG PIP_NO_CACHE_DIR=false |
|3 PIP_NO_CACHE_DIR=false http_proxy=http://proxy.iil.intel.com:911 https_proxy=http://proxy.iil.intel.com:911 /bin/sh -c wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/intel-oneapi-archive-keyring.gpg > /dev/null && echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " | tee /etc/apt/sources.list.d/oneAPI.list && chmod 644 /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && rm /etc/apt/sources.list.d/intel-graphics.list && wget -O- https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor | tee /usr/share/keyrings/intel-graphics.gpg > /dev/null && echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && chmod 644 /usr/share/keyrings/intel-graphics.gpg && apt-get update && apt-get install -y --no-install-recommends curl wget git sudo && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && env DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends libunwind8-dev vim less && apt-get install -y --no-install-recommends gnupg gpg-agent software-properties-common && add-apt-repository ppa:deadsnakes/ppa -y && apt-get install -y --no-install-recommends python3.11 git curl wget && rm /usr/bin/python3 && ln -s /usr/bin/python3.11 /usr/bin/python3 && ln -s /usr/bin/python3 /usr/bin/python && apt-get install -y --no-install-recommends python3-pip python3.11-dev python3-wheel python3.11-distutils && wget https://bootstrap.pypa.io/get-pip.py -O get-pip.py && python3 get-pip.py && rm get-pip.py && pip install --upgrade requests argparse urllib3 && pip install --pre --upgrade ipex-llm[cpp] && pip install transformers==4.36.2 && pip install transformers_stream_generator einops tiktoken && apt-get update && mkdir -p /tmp/gpu && cd /tmp/gpu && wget https://github.com/oneapi-src/level-zero/releases/download/v1.18.5/level-zero_1.18.5+u22.04_amd64.deb && wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-core_1.0.17791.9_amd64.deb && wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-opencl_1.0.17791.9_amd64.deb && wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-level-zero-gpu_1.6.31294.12_amd64.deb && wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-opencl-icd_24.39.31294.12_amd64.deb && wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/libigdgmm12_22.5.2_amd64.deb && dpkg -i *.deb && rm *.deb && rm -rf /tmp/gpu && mkdir -p /llm && cd /llm && find /usr/lib/python3/dist-packages/ -name 'blinker*' -exec rm -rf {} + && rm -rf /root/.cache/Cypress && pip uninstall -y gunicorn python-jose PyMySQL |
COPY file:532eb2c25456968d2a1ffa8a34f03d7167eea81a4a80939d2f5f5947fb6fc40f in /llm/scripts/start-llama-cpp.sh |
COPY file:2ee533a329e2023aa6bdda252e2a6cb3395f6130e70e2ebab0149c2af41bda29 in /llm/scripts/start-ollama.sh |
COPY file:91279c47e7a8c2e2868b143fe3c77258165d13d0a6dfd3cd96dc657abbd0fa63 in /llm/scripts/benchmark_llama-cpp.sh |
WORKDIR /llm/ |
RUN mkdir -p /llm/ollama; cd /llm/ollama; init-ollama; |