diff --git a/llm-vllm-langchain/0.3.3-npu/24.03-lts/Dockerfile b/llm-vllm-langchain/0.3.3-npu/24.03-lts/Dockerfile index 5b01ae74f4bcf4b4c3ff376df45c9a77326a316c..897f61ca092bcb52b1fa75dfa5f8c4eb8ae52056 100644 --- a/llm-vllm-langchain/0.3.3-npu/24.03-lts/Dockerfile +++ b/llm-vllm-langchain/0.3.3-npu/24.03-lts/Dockerfile @@ -19,9 +19,7 @@ USER user WORKDIR /home/user/ -RUN git clone --depth=1 --branch v1.0 https://github.com/opea-project/GenAIComps.git && \ - cp -r GenAIComps/comps . && \ - rm -rf GenAIComps +RUN git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout v1.0 RUN cd /tmp && git clone --depth 1 https://github.com/trimesh/vhacdx && cd vhacdx && \ CFLAGS="-I /tmp/vhacdx" pip install . && \ @@ -30,7 +28,8 @@ RUN cd /tmp && git clone --depth 1 https://github.com/trimesh/vhacdx && cd vhacd RUN python -m pip install scikit-build-core numpy && \ cd /tmp && git clone --depth 1 https://github.com/elalish/manifold.git && \ cd manifold && git clone --depth 1 --branch v2021.10.0 https://github.com/oneapi-src/oneTBB.git && \ - python -m pip install --upgrade pip setuptools wheel build nanobind ninja && \ + python -m pip install --upgrade pip setuptools wheel build ninja && \ + pip install "nanobind>=1.8.0,<=2.2.0" && \ python -m build --no-isolation --sdist --wheel && \ python -m pip install dist/manifold3d-*.whl && \ rm -rf /tmp/manifold diff --git a/retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile b/retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile index ca061bb629b6d9538442f7b96fa1d8aad6e96657..78d43bf8fd4ceb3301c0eb505164463c8917a9ed 100644 --- a/retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile +++ b/retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile @@ -7,12 +7,26 @@ ARG ARCH="cpu" RUN yum update -y && \ yum install -y --setopt=install_weak_deps=False \ - python-pip python \ + python-pip python python3-devel \ + cmake gcc-c++ git \ shadow-utils \ mesa-libGL \ jemalloc-devel \ git +RUN cd /tmp && git clone --depth 1 https://github.com/trimesh/vhacdx && cd vhacdx && \ + CFLAGS="-I /tmp/vhacdx" pip install . && \ + rm -rf /tmp/vhacdx + +RUN python -m pip install scikit-build-core numpy && \ + cd /tmp && git clone --depth 1 https://github.com/elalish/manifold.git && \ + cd manifold && git clone --depth 1 --branch v2021.10.0 https://github.com/oneapi-src/oneTBB.git && \ + python -m pip install --upgrade pip setuptools wheel build ninja && \ + pip install "nanobind>=1.8.0,<=2.2.0" && \ + python -m build --no-isolation --sdist --wheel && \ + python -m pip install dist/manifold3d-*.whl && \ + rm -rf /tmp/manifold + RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ chown -R user /home/user/ diff --git a/retriever-redis-langchain/meta.yml b/retriever-redis-langchain/meta.yml index f07b1cb62ef111d2185d8b1ad8f9edc02028dbfb..b491223f46cbbde3cba3a64f91747cecbb85ffc4 100644 --- a/retriever-redis-langchain/meta.yml +++ b/retriever-redis-langchain/meta.yml @@ -1,3 +1,2 @@ 0.3.3-redis5.1.1-oe2403lts: - path: retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile - arch: x86_64 \ No newline at end of file + path: retriever-redis-langchain/0.3.3-redis5.1.1/24.03-lts/Dockerfile \ No newline at end of file diff --git a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile index 7fb6efd4f35dbdb848fc0fe838f39fb4e89e2fa2..79c5e9f53751c6cfb1da795662096ea9ea43151e 100644 --- a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile +++ b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile @@ -1,13 +1,12 @@ FROM openeuler/openeuler:24.03-lts AS chef +ARG TARGETARCH +ARG BUILDARCH WORKDIR /usr/src - -ENV SCCACHE=0.5.4 -ENV RUSTC_WRAPPER=/usr/local/bin/sccache - RUN yum update -y && \ yum install -y \ --setopt=install_weak_deps=False \ openssl-devel \ + ca-certificates \ gcc \ g++ \ git @@ -16,62 +15,46 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && chmod +x rustup-init && \ ./rustup-init -y && \ rm rustup-init - ENV PATH="/root/.cargo/bin:$PATH" - -# Donwload, configure sccache -RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz | tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache && \ - chmod +x /usr/local/bin/sccache - RUN cargo install cargo-chef --locked FROM chef AS planner - RUN git clone https://github.com/huggingface/text-embeddings-inference.git - WORKDIR /usr/src/text-embeddings-inference - RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder - +RUN yum update -y && \ + yum install -y \ + --setopt=install_weak_deps=False \ + ca-certificates \ + openssl-devel ARG GIT_SHA ARG DOCKER_LABEL - -# sccache specific variables ARG ACTIONS_CACHE_URL ARG ACTIONS_RUNTIME_TOKEN -ARG SCCACHE_GHA_ENABLED - COPY --from=planner /usr/src/text-embeddings-inference/recipe.json recipe.json - -RUN cargo chef cook --release --features ort --no-default-features --recipe-path recipe.json && sccache -s - +RUN cargo chef cook --release --features ort --no-default-features --recipe-path recipe.json RUN git clone https://github.com/huggingface/text-embeddings-inference.git FROM builder AS http-builder WORKDIR /usr/src/text-embeddings-inference - -RUN cargo build --release --bin text-embeddings-router -F ort -F http --no-default-features && sccache -s +RUN cargo build --release --bin text-embeddings-router -F ort -F http --no-default-features FROM builder AS grpc-builder WORKDIR /usr/src/text-embeddings-inference - -RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ +RUN PROTOC_ARCH=$(if [ "$TARGETARCH" = "amd64" ]; then echo "x86_64"; elif [ "$TARGETARCH" = "arm64" ]; then echo "aarch64"; fi) && \ + PROTOC_ZIP=protoc-21.12-linux-$PROTOC_ARCH.zip && \ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP && \ unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ unzip -o $PROTOC_ZIP -d /usr/local 'include/*' && \ rm -f $PROTOC_ZIP - COPY proto proto - -RUN cargo build --release --bin text-embeddings-router -F grpc -F ort --no-default-features && sccache -s +RUN cargo build --release --bin text-embeddings-router -F grpc -F ort --no-default-features FROM openeuler/openeuler:24.03-lts AS base - ENV HUGGINGFACE_HUB_CACHE=/data \ PORT=80 - RUN yum update -y && \ yum install -y \ --setopt=install_weak_deps=False \ @@ -79,24 +62,21 @@ RUN yum update -y && \ openssl-devel FROM base AS grpc - -COPY --from=grpc-builder /usr/src/text-embeddings-inference/target/release/text-embeddings-router /usr/local/bin/text-embeddings-router - +COPY --from=grpc-builder /usr/src/text-embeddings-inference/target/release/text-embeddings-router \ +/usr/local/bin/text-embeddings-router ENTRYPOINT ["text-embeddings-router"] CMD ["--json-output"] FROM base AS http - -COPY --from=http-builder /usr/src/text-embeddings-inference/target/release/text-embeddings-router /usr/local/bin/text-embeddings-router +COPY --from=http-builder /usr/src/text-embeddings-inference/target/release/text-embeddings-router \ +/usr/local/bin/text-embeddings-router # Amazon SageMaker compatible image FROM http AS sagemaker COPY --chmod=775 sagemaker-entrypoint.sh entrypoint.sh - ENTRYPOINT ["./entrypoint.sh"] # Default image FROM http - ENTRYPOINT ["text-embeddings-router"] CMD ["--json-output"] diff --git a/text-embeddings-inference-cpu/meta.yml b/text-embeddings-inference-cpu/meta.yml index fa1a239ed9410c9271a703e02abaf250c52eff3f..0677c9098f9a00143ec1e49373366c17c93c38f8 100644 --- a/text-embeddings-inference-cpu/meta.yml +++ b/text-embeddings-inference-cpu/meta.yml @@ -1,3 +1,2 @@ 1.5-oe2403lts: - path: text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile - arch: x86_64 \ No newline at end of file + path: text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile \ No newline at end of file diff --git a/vllm/0.6.3-cann8.0.rc3.alpha002-910b-py3.9/22.03-lts/Dockerfile b/vllm/0.6.3-cann8.0.rc3.alpha002-910b-py3.9/22.03-lts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8b15ddf08064c43d0042dfaae4a13067334fe762 --- /dev/null +++ b/vllm/0.6.3-cann8.0.rc3.alpha002-910b-py3.9/22.03-lts/Dockerfile @@ -0,0 +1,11 @@ +FROM ascendai/cann:8.0.rc3.alpha002-910b-openeuler22.03-py3.9 +RUN dnf update -y && \ + dnf install -y python3-pip git +WORKDIR /workspace +RUN git clone -b npu_support --depth 1 https://github.com/GuangJie1/vllm.git +# install build requirements +RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt +# build vLLM with NPU backend +RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" VLLM_TARGET_DEVICE="npu" python3 -m pip install /workspace/vllm/ +ENV HF_ENDPOINT=https://hf-mirror.com +ENTRYPOINT ["bash", "-c", "source /root/.bashrc && exec python3 -m vllm.entrypoints.openai.api_server \"$@\"", "--"] \ No newline at end of file diff --git a/vllm/meta.yml b/vllm/meta.yml index f7f8162028e7d34ed1f626018229803967a73bde..af53a6a7278252bba652f7b8816aa48d695805e2 100644 --- a/vllm/meta.yml +++ b/vllm/meta.yml @@ -1,3 +1,5 @@ 0.6.3-oe2403lts: path: vllm/0.6.3/24.03-lts/Dockerfile - arch: x86_64 \ No newline at end of file + arch: x86_64 +0.6.3-cann8.0.rc3.alpha002-910b-py3.9-oe2203lts: + path: vllm-npu-openai/0.6.3-cann8.0.rc3.alpha002-910b-py3.9/22.03-lts/Dockerfile \ No newline at end of file