File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# This command ensures that the script will exit immediately if any command fails.
44set -e
55
6+ echo " --- [ENV] Torch and Scatter ---"
7+ # 1. 打印 pip 识别到的安装信息和路径
8+ conda run -n dpnegf bash -c " pip show torch torch-scatter || true"
9+ # 2. 尝试直接 import 并打印底层版本,如果这里报错,说明 Docker 镜像本身就有问题
10+ conda run -n dpnegf bash -c " python -c \" import torch; print('Torch:', torch.__version__); import torch_scatter; print('Scatter:', torch_scatter.__version__)\" || echo '❌ Import 失败,镜像底层环境已损坏'"
11+
612echo " --- Installing/updating package from PR in editable mode ---"
713
8- # We use 'conda run' to execute the commands within the 'dpusk ' environment.
14+ # We use 'conda run' to execute the commands within the 'dpnegf ' environment.
915# 1. `pip install -e .`: The '-e' (editable) flag is crucial. It installs the
1016# package from the current directory (the PR's code) in a way that links
1117# back to the source files. This ensures that the tests run against the
1218# very latest code from the pull request, not the version baked into the
1319# Docker image.
1420# 2. `pytest ./tests/`: After the package is installed, we run the tests.
1521
16- conda run -n dpnegf bash -c " pip install -e . && pytest dpnegf/tests/"
22+ conda run -n dpnegf bash -c " pip install --no-deps - e . && pytest dpnegf/tests/"
1723
1824echo " --- Unit Tests Passed Successfully ---"
1925
You can’t perform that action at this time.
0 commit comments