Files
FastDeploy/dockerfiles/Dockerfile.xpu
yulangz 17314ee126 [XPU] Update doc and add scripts for downloading dependencies (#2845)
* [XPU] update xvllm download

* update supported models

* fix xpu model runner in huge memory with small model

* update doc
2025-07-16 11:05:56 +08:00

38 lines
1.7 KiB
Docker

FROM ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddlenlp:llm-base-gcc12.3-xpu-xft20250402-v1.1
WORKDIR /workspace
ENV http_proxy=http://agent.baidu.com:8891
ENV https_proxy=http://agent.baidu.com:8891
RUN echo "\
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse \n\
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse \n\
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse" > /etc/apt/sources.list
RUN apt-get update && apt-get install -y libibverbs-dev librdmacm-dev cmake pybind11-dev
# uninstall existing package
RUN python -m pip uninstall paddlepaddle-gpu paddlepaddle-xpu -y
# install paddlepaddle
RUN python -m pip install --no-cache-dir --progress-bar off paddlepaddle-xpu==3.1.0 -i https://www.paddlepaddle.org.cn/packages/stable/xpu-p800/
COPY . /workspace/FastDeploy
# get xtdk and xvllm and xre
RUN mkdir -p /workspace/deps && cd /workspace/deps && \
wget https://klx-sdk-release-public.su.bcebos.com/xre/kl3-release/5.0.21.21/xre-Linux-x86_64-5.0.21.21.tar.gz && \
tar -zxf xre-Linux-x86_64-5.0.21.21.tar.gz && mv xre-Linux-x86_64-5.0.21.21 xre && \
cd /workspace/FastDeploy && bash custom_ops/xpu_ops/src/download_dependencies.sh stable
ENV PATH=/workspace/deps/xre/bin:$PATH
ENV CLANG_PATH=/workspace/FastDeploy/custom_ops/xpu_ops/src/third_party/xtdk
ENV XVLLM_PATH=/workspace/FastDeploy/custom_ops/xpu_ops/src/third_party/xvllm
# build and install FastDeploy
RUN cd /workspace/FastDeploy && bash build.sh && python -m pip install --no-cache-dir dist/* && rm -rf /workspace/FastDeploy
ENV http_proxy=""
ENV https_proxy=""
ENV no_proxy=""