Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile.310p
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi
source /usr/local/Ascend/nnal/atb/set_env.sh && \
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
python3 -m pip uninstall -y triton triton-ascend && \
python3 -m pip install -v triton-ascend==3.2.0 && \
python3 -m pip uninstall -y triton triton-ascend || true && \
python3 -m pip cache purge

# Append `libascend_hal.so` path (devlib) to LD_LIBRARY_PATH
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.310p.openEuler
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/c++/12:/usr/include/c++/12/`uname -i`-openEuler-linux && \
python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
python3 -m pip uninstall -y triton triton-ascend && \
python3 -m pip install -v triton-ascend==3.2.0 && \
python3 -m pip uninstall -y triton triton-ascend || true && \
python3 -m pip cache purge

RUN echo "export LD_PRELOAD=/usr/lib64/libjemalloc.so.2:$LD_PRELOAD" >> ~/.bashrc
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[build-system]
# Should be mirrored in requirements.txt
# Should be mirrored in requirements.txt, except triton-ascend.
# triton-ascend is handled in setup.py and skipped for 310P SOC versions.
requires = [
"attrs",
"cmake>=3.26",
Expand Down Expand Up @@ -29,8 +30,7 @@ requires = [
"fastapi<0.124.0",
"opencv-python-headless<=4.11.0.86", # Required to avoid numpy version conflict with vllm
"compressed_tensors>=0.11.0",
"arctic-inference==0.1.1",
"triton-ascend==3.2.0"
"arctic-inference==0.1.1"
]
build-backend = "setuptools.build_meta"

Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,21 @@ def read_readme() -> str:
def get_requirements() -> list[str]:
"""Get Python package dependencies from requirements.txt."""

soc_version = (envs.SOC_VERSION or "").lower()
# Align with CMakeLists.txt: if(SOC_VERSION MATCHES "ascend310p.*")
skip_triton_ascend = soc_version.startswith("ascend310p")

def _read_requirements(filename: str) -> list[str]:
with open(get_path(filename)) as f:
requirements = f.read().strip().split("\n")
requirements = f.read().splitlines()
resolved_requirements = []
for line in requirements:
line = line.strip()
if not line or line.startswith("#"):
continue
if line.startswith("-r "):
resolved_requirements += _read_requirements(line.split()[1])
elif line.startswith("--"):
elif line.startswith("--") or skip_triton_ascend and line.startswith("triton-ascend"):
continue
else:
resolved_requirements.append(line)
Expand Down
Loading