Use explicit MetaX Python and vLLM paths
All checks were successful
Build and verify Qwen2.5 compatibility engines / docker (push) Successful in 13s
All checks were successful
Build and verify Qwen2.5 compatibility engines / docker (push) Successful in 13s
This commit is contained in:
@@ -73,6 +73,8 @@ jobs:
|
|||||||
-t "$cambricon_image" .
|
-t "$cambricon_image" .
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
||||||
|
--build-arg PYTHON_BIN=/opt/conda/bin/python3 \
|
||||||
|
--build-arg VLLM_BIN=/opt/conda/bin/vllm \
|
||||||
-t "$metax_image" .
|
-t "$metax_image" .
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
ARG BASE_IMAGE=harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
|
ARG BASE_IMAGE=harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
|
||||||
FROM ${BASE_IMAGE}
|
FROM ${BASE_IMAGE}
|
||||||
|
|
||||||
|
ARG PYTHON_BIN=python3
|
||||||
|
ARG VLLM_BIN=vllm
|
||||||
|
ENV MODELHUB_COMPAT_PYTHON=${PYTHON_BIN}
|
||||||
|
|
||||||
COPY engine_compat.py /opt/modelhub/engine_compat.py
|
COPY engine_compat.py /opt/modelhub/engine_compat.py
|
||||||
COPY vllm_wrapper.sh /opt/modelhub/vllm_wrapper.sh
|
COPY vllm_wrapper.sh /opt/modelhub/vllm_wrapper.sh
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN set -eu; \
|
||||||
python3 -m py_compile /opt/modelhub/engine_compat.py; \
|
"$PYTHON_BIN" -m py_compile /opt/modelhub/engine_compat.py; \
|
||||||
vllm_bin="$(command -v vllm)"; \
|
if [ "$VLLM_BIN" = vllm ]; then vllm_bin="$(command -v vllm)"; else vllm_bin="$VLLM_BIN"; fi; \
|
||||||
|
test -x "$vllm_bin"; \
|
||||||
mv "$vllm_bin" "$(dirname "$vllm_bin")/vllm_real"; \
|
mv "$vllm_bin" "$(dirname "$vllm_bin")/vllm_real"; \
|
||||||
cp /opt/modelhub/vllm_wrapper.sh "$vllm_bin"; \
|
cp /opt/modelhub/vllm_wrapper.sh "$vllm_bin"; \
|
||||||
chmod 0755 "$vllm_bin" /opt/modelhub/engine_compat.py
|
chmod 0755 "$vllm_bin" /opt/modelhub/engine_compat.py
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ docker build --build-arg BASE_IMAGE=harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0
|
|||||||
docker build --build-arg BASE_IMAGE=harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-20260228 \
|
docker build --build-arg BASE_IMAGE=harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-20260228 \
|
||||||
-t qwen25-compat:mlu370 .
|
-t qwen25-compat:mlu370 .
|
||||||
docker build --build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
docker build --build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
||||||
|
--build-arg PYTHON_BIN=/opt/conda/bin/python3 \
|
||||||
|
--build-arg VLLM_BIN=/opt/conda/bin/vllm \
|
||||||
-t qwen25-compat:metax .
|
-t qwen25-compat:metax .
|
||||||
docker build --build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
docker build --build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
||||||
-t qwen25-compat:vastai .
|
-t qwen25-compat:vastai .
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
vllm_real="$(dirname "$(readlink -f "$0")")/vllm_real"
|
vllm_real="$(dirname "$(readlink -f "$0")")/vllm_real"
|
||||||
|
python_bin="${MODELHUB_COMPAT_PYTHON:-python3}"
|
||||||
|
|
||||||
if [[ "${1:-}" != "serve" || -z "${2:-}" ]]; then
|
if [[ "${1:-}" != "serve" || -z "${2:-}" ]]; then
|
||||||
exec "$vllm_real" "$@"
|
exec "$vllm_real" "$@"
|
||||||
@@ -22,9 +23,9 @@ for ((i=0; i<${#args[@]}; i++)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n "$tokenizer_dir" && -d "$tokenizer_dir" ]]; then
|
if [[ -n "$tokenizer_dir" && -d "$tokenizer_dir" ]]; then
|
||||||
prepared="$(python3 /opt/modelhub/engine_compat.py "$model_dir" "$tokenizer_dir")"
|
prepared="$("$python_bin" /opt/modelhub/engine_compat.py "$model_dir" "$tokenizer_dir")"
|
||||||
else
|
else
|
||||||
prepared="$(python3 /opt/modelhub/engine_compat.py "$model_dir")"
|
prepared="$("$python_bin" /opt/modelhub/engine_compat.py "$model_dir")"
|
||||||
tokenizer_dir=""
|
tokenizer_dir=""
|
||||||
fi
|
fi
|
||||||
if [[ -z "$prepared" ]]; then
|
if [[ -z "$prepared" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user