From 3a533bcd6923689a0d668a506cf9ee759d1ad1d4 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 6 Feb 2025 23:47:12 +0100 Subject: [PATCH] Non system uv. --- Dockerfile_intel | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Dockerfile_intel b/Dockerfile_intel index 68170c52..fedd22f9 100644 --- a/Dockerfile_intel +++ b/Dockerfile_intel @@ -53,7 +53,7 @@ ARG MAMBA_VERSION=23.1.0-1 ARG PYTHON_VERSION='3.11.10' # Automatically set by buildx ARG TARGETPLATFORM -ENV PATH=/opt/conda/bin:$PATH +ENV PATH="/opt/conda/bin:$PATH" # TGI seem to require libssl.so.1.1 instead of libssl.so.3 so we can't use ubuntu 22.04. Ubuntu 20.04 has python==3.8, and TGI requires python>=3.9, hence the need for miniconda. # Install mamba @@ -102,7 +102,6 @@ WORKDIR /usr/src COPY proto proto COPY server server COPY server/Makefile server/Makefile -ENV UV_SYSTEM_PYTHON=1 RUN cd server && \ pip install -U pip uv && \ uv sync --frozen --extra gen --extra accelerate --extra compressed-tensors --extra quantize --extra peft --extra outlines --no-install-project && \ @@ -115,12 +114,12 @@ RUN cd server && \ pwd && \ text-generation-server --help -RUN . ./server/.venv/bin/activate && pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torch-2.5.0a0%2Bgite84e33f-cp311-cp311-linux_x86_64.whl --no-cache-dir -RUN . ./server/.venv/bin/activate && pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torchaudio-2.5.0a0%2B56bc006-cp311-cp311-linux_x86_64.whl --no-cache-dir -RUN . ./server/.venv/bin/activate && pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torchvision-0.20.0a0%2B8e8a208-cp311-cp311-linux_x86_64.whl --no-cache-dir -RUN . ./server/.venv/bin/activate && pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/oneccl_bind_pt-2.5.0%2Bxpu-cp311-cp311-linux_x86_64.whl --no-cache-dir +RUN . ./server/.venv/bin/activate && uv pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torch-2.5.0a0%2Bgite84e33f-cp311-cp311-linux_x86_64.whl --no-cache-dir +RUN . ./server/.venv/bin/activate && uv pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torchaudio-2.5.0a0%2B56bc006-cp311-cp311-linux_x86_64.whl --no-cache-dir +# RUN . ./server/.venv/bin/activate && uv pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torchvision-0.20.0a0%2B8e8a208-cp311-cp311-linux_x86_64.whl --no-cache-dir +# RUN . ./server/.venv/bin/activate && uv pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/oneccl_bind_pt-2.5.0%2Bxpu-cp311-cp311-linux_x86_64.whl --no-cache-dir -RUN . ./server/.venv/bin/activate pip install triton-xpu==3.0.0b2 --no-cache-dir +RUN . ./server/.venv/bin/activate && uv pip install triton-xpu==3.0.0b2 --no-cache-dir ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/oneapi/pti/0.9/lib:/opt/conda/lib ENV CCL_ZE_IPC_EXCHANGE=sockets @@ -194,11 +193,11 @@ RUN case ${TARGETPLATFORM} in \ RUN conda install -c conda-forge gperftools mkl -RUN pip install https://download.pytorch.org/whl/nightly/cpu/torch-2.5.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl -RUN pip install https://download.pytorch.org/whl/nightly/cpu/torchvision-0.20.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl -RUN pip install https://download.pytorch.org/whl/nightly/cpu/torchaudio-2.4.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl +RUN . ./server/.venv/bin/activate && uv pip install https://download.pytorch.org/whl/nightly/cpu/torch-2.5.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl +RUN . ./server/.venv/bin/activate && uv pip install https://download.pytorch.org/whl/nightly/cpu/torchvision-0.20.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl +RUN . ./server/.venv/bin/activate && uv pip install https://download.pytorch.org/whl/nightly/cpu/torchaudio-2.4.0.dev20240815%2Bcpu-cp311-cp311-linux_x86_64.whl -RUN pip install triton==3.1.0 py-libnuma +RUN . ./server/.venv/bin/activate && uv pip install triton==3.1.0 py-libnuma WORKDIR /usr/src @@ -206,9 +205,9 @@ RUN git clone https://github.com/intel/intel-extension-for-pytorch && cd intel-e RUN git clone https://github.com/intel/torch-ccl.git && cd torch-ccl && git checkout v2.4.0+cpu+rc0 RUN sed -i 's/VERSION_MINOR 6/VERSION_MINOR 5/' intel-extension-for-pytorch/version.txt -RUN cd intel-extension-for-pytorch && git submodule sync && git submodule update --init --recursive && python setup.py install +RUN . ./server/.venv/bin/activate && cd intel-extension-for-pytorch && git submodule sync && git submodule update --init --recursive && python setup.py install -RUN cd torch-ccl && git submodule sync && git submodule update --init --recursive && pip install . +RUN . ./server/.venv/bin/activate && cd torch-ccl && git submodule sync && git submodule update --init --recursive && pip install . ENV LD_PRELOAD=/opt/conda/lib/libtcmalloc.so ENV CCL_ROOT=/opt/conda/lib/python3.11/site-packages/oneccl_bindings_for_pytorch