A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 23:30 UTC
[CI] Resolve transformers-neuronx version conflict (#12925)
Liangfu Chen committed
Feb 8, 2025 at 01:41 UTC
c45d398e6f0e1c78b958d2e0346b860c23444af9
4 files changed
+8
-11
.buildkite/run-neuron-test.sh
-3
@@ -29,9 +29,6 @@ if [ -f /tmp/neuron-docker-build-timestamp ]; then
29
docker image prune -f
30
# Remove unused volumes / force the system prune for old images as well.
31
docker volume prune -f && docker system prune -f
32
- # Remove huggingface model artifacts and compiler cache
33
- rm -rf "${HF_MOUNT:?}/*"
34
- rm -rf "${NEURON_COMPILE_CACHE_MOUNT:?}/*"
32
echo "$current_time" > /tmp/neuron-docker-build-timestamp
33
fi
34
else
Dockerfile.neuron
+7
-1
@@ -23,10 +23,12 @@ WORKDIR ${APP_MOUNT}/vllm
23
RUN python3 -m pip install --upgrade pip
24
RUN python3 -m pip install --no-cache-dir fastapi ninja tokenizers pandas
25
RUN python3 -m pip install sentencepiece transformers==4.45.2 -U
26
-RUN python3 -m pip install transformers-neuronx --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
26
RUN python3 -m pip install neuronx-cc==2.16.345.0 --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
27
RUN python3 -m pip install pytest
28
29
+# uninstall transformers-neuronx package explicitly to avoid version conflict
30
+RUN python3 -m pip uninstall -y transformers-neuronx
31
+
32
COPY . .
33
ARG GIT_REPO_CHECK=0
34
RUN --mount=type=bind,source=.git,target=.git \
@@ -43,6 +45,10 @@ RUN --mount=type=bind,source=.git,target=.git \
45
# install development dependencies (for testing)
46
RUN python3 -m pip install -e tests/vllm_test_utils
47
48
+# install transformers-neuronx package as an optional dependencies (for V0)
49
+# FIXME: `--no-deps` argument is temporarily added to resolve transformers package version conflict
50
+RUN python3 -m pip install transformers-neuronx==0.13.* --extra-index-url=https://pip.repos.neuron.amazonaws.com -U --no-deps
51
+
52
# overwrite entrypoint to run bash script
53
RUN echo "import subprocess; import sys; subprocess.check_call(sys.argv[1:])" > /usr/local/bin/dockerd-entrypoint.py
54
requirements-neuron.txt
-1
@@ -2,6 +2,5 @@
2
-r requirements-common.txt
3
4
# Dependencies for Neuron devices
5
-transformers-neuronx >= 0.13.0
5
torch-neuronx >= 2.5.0
6
neuronx-cc
setup.py
+1
-6
@@ -374,12 +374,7 @@ def _is_hip() -> bool:
374
375
376
def _is_neuron() -> bool:
377
- torch_neuronx_installed = True
378
- try:
379
- subprocess.run(["neuron-ls"], capture_output=True, check=True)
380
- except (FileNotFoundError, PermissionError, subprocess.CalledProcessError):
381
- torch_neuronx_installed = False
382
- return torch_neuronx_installed or VLLM_TARGET_DEVICE == "neuron"
377
+ return VLLM_TARGET_DEVICE == "neuron"
378
379
380
def _is_tpu() -> bool: