From c5da4b5b761099863c4cd254605101391af58456 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Wed, 1 Jul 2026 13:18:04 +0800 Subject: [PATCH] fix(dev): align devcontainer pytest LAMMPS wrapper paths The pytest LAMMPS wrappers computed SCRIPT_PATH as the parent of the repo (dirname .../$0)/../..), while lmp/gdb_lmp and the devcontainer build scripts use the .devcontainer directory itself. Since all wrappers derive ${SCRIPT_PATH}/../{libtorch,dp/lib,.venv} and the build scripts install libtorch/dp/.venv at the repo root, the pytest wrappers resolved those two directory levels too high, pointing LAMMPS_PLUGIN_PATH/LD_LIBRARY_PATH outside the checkout. Drop the extra /../.. so all four wrappers share the same base and resolve to the repo root. Fix #5691 --- .devcontainer/gdb_pytest_lmp | 2 +- .devcontainer/pytest_lmp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/gdb_pytest_lmp b/.devcontainer/gdb_pytest_lmp index d27587ec43..d99bd01bf2 100755 --- a/.devcontainer/gdb_pytest_lmp +++ b/.devcontainer/gdb_pytest_lmp @@ -1,5 +1,5 @@ #!/bin/bash -SCRIPT_PATH=$(dirname $(realpath -s $0))/../.. +SCRIPT_PATH=$(dirname $(realpath -s $0)) export CMAKE_PREFIX_PATH=${SCRIPT_PATH}/../libtorch TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)') diff --git a/.devcontainer/pytest_lmp b/.devcontainer/pytest_lmp index bb88da883f..56b67af313 100755 --- a/.devcontainer/pytest_lmp +++ b/.devcontainer/pytest_lmp @@ -1,5 +1,5 @@ #!/bin/bash -SCRIPT_PATH=$(dirname $(realpath -s $0))/../.. +SCRIPT_PATH=$(dirname $(realpath -s $0)) export CMAKE_PREFIX_PATH=${SCRIPT_PATH}/../libtorch TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')