Skip to content

Commit 6cdc5bf

Browse files
authored
Merge devel into master (#2380)
2 parents 89d0d23 + a34e680 commit 6cdc5bf

File tree

767 files changed

+279619
-56078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

767 files changed

+279619
-56078
lines changed

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
BasedOnStyle: Google
3+
BinPackParameters: false
4+
...

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# .git-blame-ignore-revs
2+
# pre-commit
3+
97c38bb4235c9a440bd61a2459e330dba78269fa

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
attributes:
1010
label: Bug summary
1111
description: Please provide a clear and concise description of what the bug is.
12-
placeholder:
12+
placeholder:
1313
value:
1414
validations:
1515
required: true
@@ -45,7 +45,7 @@ body:
4545
attributes:
4646
label: Input Files, Running Commands, Error Log, etc.
4747
description: "Please provide necessary information including input file, running commands, error log , etc., AS DETAILED AS POSSIBLE to help locate and reproduce your problem. WARNING: Do not use image to show error log! Paste texts in a code block instead."
48-
placeholder:
48+
placeholder:
4949
value:
5050
validations:
5151
required: true
@@ -54,7 +54,7 @@ body:
5454
attributes:
5555
label: Steps to Reproduce
5656
description: "Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem."
57-
placeholder:
57+
placeholder:
5858
value:
5959
validations:
6060
required: true
@@ -63,7 +63,7 @@ body:
6363
attributes:
6464
label: Further Information, Files, and Links
6565
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
66-
placeholder:
66+
placeholder:
6767
value:
6868
validations:
6969
required: false

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
attributes:
1010
label: Summary
1111
description: "Please provide a brief and concise description of the suggested feature or change"
12-
placeholder:
12+
placeholder:
1313
value:
1414
validations:
1515
required: true
@@ -18,7 +18,7 @@ body:
1818
attributes:
1919
label: Detailed Description
2020
description: "Please explain how you would like to see deepmd-kit enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address."
21-
placeholder:
21+
placeholder:
2222
value:
2323
validations:
2424
required: true
@@ -27,7 +27,7 @@ body:
2727
attributes:
2828
label: Further Information, Files, and Links
2929
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
30-
placeholder:
30+
placeholder:
3131
value:
3232
validations:
3333
required: false

.github/ISSUE_TEMPLATE/generic-issue.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
attributes:
1010
label: Summary
1111
description: "Please provide a clear and concise description of what the question is."
12-
placeholder:
12+
placeholder:
1313
value:
1414
validations:
1515
required: true
@@ -32,7 +32,7 @@ body:
3232
attributes:
3333
label: Python Version, CUDA Version, GCC Version, LAMMPS Version, etc
3434
description: "If applicable, specify what platform you are running on."
35-
placeholder:
35+
placeholder:
3636
value:
3737
validations:
3838
required: false
@@ -41,7 +41,7 @@ body:
4141
attributes:
4242
label: Details
4343
description: "Please explain the issue in detail here."
44-
placeholder:
44+
placeholder:
4545
value:
4646
validations:
4747
required: true

.github/ISSUE_TEMPLATE/parameters.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
attributes:
1010
label: Summary
1111
description: "Please provide a clear and concise description of what your request is."
12-
placeholder:
12+
placeholder:
1313
value:
1414
validations:
1515
required: true
@@ -18,7 +18,7 @@ body:
1818
attributes:
1919
label: Detailed Description
2020
description: "Please explain how you would like to see deepmd-kit enhanced. Specify your material system, and exactly what behaviors or properties you are looking for, or what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation."
21-
placeholder:
21+
placeholder:
2222
value:
2323
validations:
2424
required: true
@@ -27,7 +27,7 @@ body:
2727
attributes:
2828
label: Further Information, Files, and Links
2929
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
30-
placeholder:
30+
placeholder:
3131
value:
3232
validations:
3333
required: false

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
target-branch: "devel"

.github/workflows/build_cc.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,37 @@ jobs:
77
name: Build C++
88
runs-on: ubuntu-latest
99
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
10-
strategy:
10+
strategy:
1111
matrix:
1212
include:
1313
- variant: cpu
14+
dp_variant: cpu
1415
- variant: cuda
16+
dp_variant: cuda
17+
- variant: cuda120
18+
dp_variant: cuda
1519
- variant: rocm
20+
dp_variant: rocm
1621
- variant: clang
22+
dp_variant: clang
1723
steps:
1824
- name: work around permission issue
1925
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
20-
- uses: actions/checkout@master
26+
- uses: actions/checkout@v3
2127
with:
2228
submodules: true
2329
- run: apt-get update && apt-get install -y nvidia-cuda-toolkit
2430
if: matrix.variant == 'cuda'
31+
- run: |
32+
apt-get update \
33+
&& apt-get -y install wget \
34+
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
35+
&& dpkg -i cuda-keyring_1.0-1_all.deb \
36+
&& apt-get update \
37+
&& apt-get -y install cuda-12-0
38+
if: matrix.variant == 'cuda120'
39+
env:
40+
DEBIAN_FRONTEND: noninteractive
2541
- run: |
2642
apt-get update && apt-get install -y gnupg2 \
2743
&& echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3/ jammy main' | tee /etc/apt/sources.list.d/rocm.list \
@@ -31,10 +47,10 @@ jobs:
3147
&& apt-get install -y rocm-dev hipcub-dev
3248
if: matrix.variant == 'rocm'
3349
- run: apt-get update && apt-get install -y clang
34-
if: matrix.variant == 'clang'
50+
if: matrix.variant == 'clang'
3551
- run: source/install/build_cc.sh
3652
env:
37-
DP_VARIANT: ${{ matrix.variant }}
53+
DP_VARIANT: ${{ matrix.dp_variant }}
3854
DOWNLOAD_TENSORFLOW: "FALSE"
3955
if: matrix.variant != 'clang'
4056
- run: source/install/build_cc.sh
@@ -44,9 +60,22 @@ jobs:
4460
CC: clang
4561
CXX: clang++
4662
if: matrix.variant == 'clang'
63+
- name: Test files exist
64+
run: |
65+
test -f dp/bin/dp_ipi &&
66+
test -f dp/lib/libdeepmd_cc.so &&
67+
test -f dp/lib/libdeepmd_c.so &&
68+
test -f dp/lib/libdeepmd_op.so &&
69+
test -f dp/lib/libdeepmd_ipi.so &&
70+
test -f dp/lib/libdeepmd_lmp.so &&
71+
test -f dp/lib/libdeepmd.so
4772
pass:
4873
name: Pass building C++
4974
needs: [buildcc]
5075
runs-on: ubuntu-latest
76+
if: always()
5177
steps:
52-
- run: echo "All jobs passed"
78+
- name: Decide whether the needed jobs succeeded or failed
79+
uses: re-actors/alls-green@release/v1
80+
with:
81+
jobs: ${{ toJSON(needs) }}

.github/workflows/build_wheel.yml

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,13 @@ jobs:
3636
- uses: actions/checkout@v2
3737
with:
3838
submodules: true
39+
# https://github.com/pypa/setuptools_scm/issues/480
40+
fetch-depth: 0
3941
- uses: docker/setup-qemu-action@v2
4042
name: Setup QEMU
4143
if: matrix.platform_id == 'manylinux_aarch64'
42-
- uses: actions/setup-python@v2
43-
name: Install Python
44-
with:
45-
python-version: '3.8'
46-
47-
- run: python -m pip install cibuildwheel==2.11.3
4844
- name: Build wheels
49-
run: python -m cibuildwheel --output-dir wheelhouse
45+
uses: pypa/cibuildwheel@v2.11.3
5046
env:
5147
CIBW_BUILD_VERBOSITY: 1
5248
CIBW_ARCHS: all
@@ -83,7 +79,49 @@ jobs:
8379
with:
8480
name: artifact
8581
path: dist
86-
- uses: pypa/gh-action-pypi-publish@master
82+
- uses: pypa/gh-action-pypi-publish@v4
8783
with:
8884
user: __token__
8985
password: ${{ secrets.pypi_password }}
86+
87+
build_docker:
88+
# use the already built wheels to build docker
89+
needs: [build_wheels]
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: actions/checkout@v3
93+
- uses: actions/download-artifact@v3
94+
with:
95+
name: artifact
96+
path: source/install/docker/dist
97+
- name: Log in to the Container registry
98+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
99+
with:
100+
registry: ghcr.io
101+
username: ${{ github.actor }}
102+
password: ${{ secrets.GITHUB_TOKEN }}
103+
104+
- name: Extract metadata (tags, labels) for Docker
105+
id: meta
106+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
107+
with:
108+
images: ghcr.io/deepmodeling/deepmd-kit
109+
110+
- name: Build and push Docker image
111+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
112+
with:
113+
context: source/install/docker
114+
push: ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' }}
115+
tags: ${{ steps.meta.outputs.tags }}
116+
labels: ${{ steps.meta.outputs.labels }}
117+
118+
pass:
119+
name: Pass testing build wheels
120+
needs: [build_wheels, build_sdist]
121+
runs-on: ubuntu-latest
122+
if: always()
123+
steps:
124+
- name: Decide whether the needed jobs succeeded or failed
125+
uses: re-actors/alls-green@release/v1
126+
with:
127+
jobs: ${{ toJSON(needs) }}

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
steps:
1212
- uses: actions/labeler@v4
1313
with:
14-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)