Skip to content

Commit ce75fcb

Browse files
fix ase tarball url and testing C library (#2950)
fix the CI error --------- Signed-off-by: Jinzhe Zeng <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent df04bd7 commit ce75fcb

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/workflows/test_cc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# TODO: remove ase version when ase has new release
3131
- run: |
3232
python -m pip install -U pip
33-
python -m pip install -e .[cpu,test,lmp] "ase @ https://github.com/rosswhitfield/ase/archive/edd03571aff6944b77b4a4b055239f3c3e4eeb66.zip"
33+
python -m pip install -e .[cpu,test,lmp] "ase @ https://gitlab.com/ase/ase/-/archive/8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f/ase-8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f.tar.gz"
3434
env:
3535
DP_BUILD_TESTING: 1
3636
- run: pytest --cov=deepmd source/lmp/tests

.github/workflows/test_cuda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set PyPI mirror for Aliyun cloud machine
3737
run: python -m pip config --user set global.index-url https://mirrors.aliyun.com/pypi/simple/
3838
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
39-
- run: python -m pip install -v -e .[gpu,test,lmp,cu11] "ase @ https://github.com/rosswhitfield/ase/archive/edd03571aff6944b77b4a4b055239f3c3e4eeb66.zip"
39+
- run: python -m pip install -v -e .[gpu,test,lmp,cu11] "ase @ https://gitlab.com/ase/ase/-/archive/8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f/ase-8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f.tar.gz"
4040
env:
4141
DP_BUILD_TESTING: 1
4242
DP_VARIANT: cuda
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: LGPL-3.0-or-later
2+
#include "deepmd/c_api.h"
3+
4+
int main() {
5+
DP_ConvertPbtxtToPb("../../source/tests/infer/deeppot.pbtxt", "graph.pb");
6+
return 0;
7+
}

source/install/docker_test_package_c.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ SCRIPT_PATH=$(dirname $(realpath -s $0))
55

66
# assume libdeepmd_c.tar.gz has been created
77

8-
wget "https://drive.google.com/uc?export=download&id=1xldLhzm4uSkq6iPohSycNWAsWqKAenKX" -O ${SCRIPT_PATH}/../../examples/infer_water/"graph.pb"
9-
108
docker run --rm -v ${SCRIPT_PATH}/../..:/root/deepmd-kit -w /root/deepmd-kit \
119
gcc:4.9 \
1210
/bin/sh -c "tar vxzf libdeepmd_c.tar.gz \
1311
&& cd examples/infer_water \
12+
&& gcc convert_model.c -std=c99 -L ../../libdeepmd_c/lib -I ../../libdeepmd_c/include -Wl,--no-as-needed -ldeepmd_c -Wl,-rpath=../../libdeepmd_c/lib -o convert_model \
1413
&& gcc infer_water.c -std=c99 -L ../../libdeepmd_c/lib -I ../../libdeepmd_c/include -Wl,--no-as-needed -ldeepmd_c -Wl,-rpath=../../libdeepmd_c/lib -o infer_water \
14+
&& ./convert_model \
1515
&& ./infer_water"

0 commit comments

Comments
 (0)