Skip to content

Commit

Permalink
fix: fix git version detection in docker_package_c.sh (deepmodeling#3658
Browse files Browse the repository at this point in the history
)

Fix the following error in docker_package_c.sh

```
-- Found Git: /usr/bin/git (found version "2.25.1")
fatal: detected dubious ownership in repository at '/root/deepmd-kit'
To add an exception for this directory, call:

	git config --global --add safe.directory /root/deepmd-kit
```

In addition, fetching git tags in actions/checkout.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
(cherry picked from commit 6eadc29)
  • Loading branch information
njzjz committed Jul 2, 2024
1 parent b563e35 commit 1f2f6fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/package_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
filename: libdeepmd_c_cu11.tar.gz
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Package C library
run: ./source/install/docker_package_c.sh
env:
Expand Down
1 change: 1 addition & 0 deletions source/install/docker_package_c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SCRIPT_PATH=$(dirname $(realpath -s $0))
docker run --rm -v ${SCRIPT_PATH}/../..:/root/deepmd-kit -w /root/deepmd-kit \
tensorflow/build:${TENSORFLOW_BUILD_VERSION:-2.15}-python3.11 \
/bin/sh -c "pip install \"tensorflow${TENSORFLOW_VERSION}\" cmake \
&& git config --global --add safe.directory /root/deepmd-kit \
&& cd /root/deepmd-kit/source/install \
&& CC=/dt9/usr/bin/gcc \
CXX=/dt9/usr/bin/g++ \
Expand Down

0 comments on commit 1f2f6fd

Please sign in to comment.