Skip to content

Commit c45d398

Browse files
authored
[CI] Resolve transformers-neuronx version conflict (vllm-project#12925)
1 parent 011e612 commit c45d398

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

.buildkite/run-neuron-test.sh

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ if [ -f /tmp/neuron-docker-build-timestamp ]; then
2929
docker image prune -f
3030
# Remove unused volumes / force the system prune for old images as well.
3131
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:?}/*"
3532
echo "$current_time" > /tmp/neuron-docker-build-timestamp
3633
fi
3734
else

Dockerfile.neuron

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ WORKDIR ${APP_MOUNT}/vllm
2323
RUN python3 -m pip install --upgrade pip
2424
RUN python3 -m pip install --no-cache-dir fastapi ninja tokenizers pandas
2525
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
2726
RUN python3 -m pip install neuronx-cc==2.16.345.0 --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
2827
RUN python3 -m pip install pytest
2928

29+
# uninstall transformers-neuronx package explicitly to avoid version conflict
30+
RUN python3 -m pip uninstall -y transformers-neuronx
31+
3032
COPY . .
3133
ARG GIT_REPO_CHECK=0
3234
RUN --mount=type=bind,source=.git,target=.git \
@@ -43,6 +45,10 @@ RUN --mount=type=bind,source=.git,target=.git \
4345
# install development dependencies (for testing)
4446
RUN python3 -m pip install -e tests/vllm_test_utils
4547

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+
4652
# overwrite entrypoint to run bash script
4753
RUN echo "import subprocess; import sys; subprocess.check_call(sys.argv[1:])" > /usr/local/bin/dockerd-entrypoint.py
4854

requirements-neuron.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
-r requirements-common.txt
33

44
# Dependencies for Neuron devices
5-
transformers-neuronx >= 0.13.0
65
torch-neuronx >= 2.5.0
76
neuronx-cc

setup.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,7 @@ def _is_hip() -> bool:
374374

375375

376376
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"
383378

384379

385380
def _is_tpu() -> bool:

0 commit comments

Comments
 (0)