Skip to content

Commit 9130de9

Browse files
authored
Maintain dockerfiles (#411)
* maintain dockerfiles * rename back to sdk.yml * remove devel docker * add more requirements.txt * runtime -> devel * update readme * installation directory * gpu4pyscf -> gpu4pyscf-devel
1 parent 73486ac commit 9130de9

File tree

7 files changed

+55
-82
lines changed

7 files changed

+55
-82
lines changed

.github/workflows/nightly_build.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Pull CUDA Devel Image
2121
run: |
22-
docker pull wxj6000/gpu4pyscf:latest
22+
docker pull pyscf/gpu4pyscf-devel:latest
2323
2424
- name: Run RKS tests
2525
run: |
@@ -28,8 +28,8 @@ jobs:
2828
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
2929
-e HTTP_PROXY=$HTTP_PROXY \
3030
-e HTTPS_PROXY=$HTTPS_PROXY \
31-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
32-
/bin/bash -c "cd /workspace && source build.sh && pytest gpu4pyscf/tests/test_benchmark_rks.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_rks_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
31+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
32+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest gpu4pyscf/tests/test_benchmark_rks.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_rks_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
3333
3434
test_uks:
3535
runs-on: [self-hosted, Linux, X64, v100]
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Pull CUDA Devel Image
4040
run: |
41-
docker pull wxj6000/gpu4pyscf:latest
41+
docker pull pyscf/gpu4pyscf-devel:latest
4242
4343
- name: Run UKS tests
4444
run: |
@@ -47,8 +47,8 @@ jobs:
4747
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
4848
-e HTTP_PROXY=$HTTP_PROXY \
4949
-e HTTPS_PROXY=$HTTPS_PROXY \
50-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
51-
/bin/bash -c "cd /workspace && source build.sh && pytest gpu4pyscf/tests/test_benchmark_uks.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.3.0_uks_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
50+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
51+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest gpu4pyscf/tests/test_benchmark_uks.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.3.0_uks_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
5252
5353
test_tddft:
5454
runs-on: [self-hosted, Linux, X64, v100]
@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Pull CUDA Devel Image
5959
run: |
60-
docker pull wxj6000/gpu4pyscf:latest
60+
docker pull pyscf/gpu4pyscf-devel:latest
6161
6262
- name: Run TDDFT tests
6363
run: |
@@ -66,26 +66,26 @@ jobs:
6666
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
6767
-e HTTP_PROXY=$HTTP_PROXY \
6868
-e HTTPS_PROXY=$HTTPS_PROXY \
69-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
70-
/bin/bash -c "cd /workspace && source build.sh && pytest gpu4pyscf/tests/test_benchmark_tddft.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.3.0_tddft_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
69+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
70+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest gpu4pyscf/tests/test_benchmark_tddft.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.3.0_tddft_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
7171
7272
test_ecp:
7373
runs-on: [self-hosted, Linux, X64, v100]
7474
steps:
7575
- uses: actions/checkout@v3
7676
- name: Pull CUDA Devel Image
7777
run: |
78-
docker pull wxj6000/gpu4pyscf:latest
79-
78+
docker pull pyscf/gpu4pyscf-devel:latest
79+
8080
- name: Run ECP tests
8181
run: |
8282
docker run --gpus all \
8383
-u "$(id -u):$(id -g)" \
8484
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
8585
-e HTTP_PROXY=$HTTP_PROXY \
8686
-e HTTPS_PROXY=$HTTPS_PROXY \
87-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
88-
/bin/bash -c "cd /workspace && source build.sh && pytest gpu4pyscf/tests/test_benchmark_ecp.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_ecp_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
87+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
88+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest gpu4pyscf/tests/test_benchmark_ecp.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_ecp_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
8989
9090
test_properties:
9191
runs-on: [self-hosted, Linux, X64, v100]
@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Pull CUDA Devel Image
9696
run: |
97-
docker pull wxj6000/gpu4pyscf:latest
97+
docker pull pyscf/gpu4pyscf-devel:latest
9898
9999
- name: Run properties tests
100100
run: |
@@ -103,6 +103,6 @@ jobs:
103103
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
104104
-e HTTP_PROXY=$HTTP_PROXY \
105105
-e HTTPS_PROXY=$HTTPS_PROXY \
106-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
107-
/bin/bash -c "cd /workspace && source build.sh && pytest gpu4pyscf/tests/test_benchmark_properties.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_properties_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
106+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
107+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest gpu4pyscf/tests/test_benchmark_properties.py -s -v -m 'not slow and not high_memory' --benchmark-compare-fail=min:10% --benchmark-compare=v1.4.0_properties_1v100 --benchmark-storage=gpu4pyscf/tests/benchmark_results/ && rm -rf .pytest_cache"
108108

.github/workflows/sdk.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Docker
1+
name: Release Docker Image
22

3-
on:
3+
on:
44
- workflow_dispatch
55

66
jobs:
@@ -18,9 +18,10 @@ jobs:
1818
id: docker_build
1919
uses: docker/build-push-action@v2
2020
with:
21-
file: dockerfiles/manylinux/Dockerfile
21+
file: dockerfiles/ubuntu_devel/Dockerfile
2222
push: true
23-
tags: pyscf/gpu4pyscf-sdk:0.1
23+
tags: |
24+
pyscf/gpu4pyscf-devel:latest
2425
#cache-from: type=local,src=/tmp/.buildx-cache
2526
#cache-to: type=local,dest=/tmp/.buildx-cache
2627
- name: Image digest

.github/workflows/unittest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Pull CUDA Devel Image
2222
run: |
23-
docker pull wxj6000/gpu4pyscf:latest
23+
docker pull pyscf/gpu4pyscf-devel:latest
2424
2525
- name: Test with pytest
2626
run: |
@@ -29,8 +29,8 @@ jobs:
2929
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
3030
-e HTTP_PROXY=$HTTP_PROXY \
3131
-e HTTPS_PROXY=$HTTPS_PROXY \
32-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
33-
/bin/bash -c "cd /workspace && source build.sh && pytest -m 'not benchmark' --cov=/workspace && rm -rf .pytest_cache"
32+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
33+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest -m 'not benchmark' --cov=/workspace && rm -rf .pytest_cache"
3434
3535
multi-gpu:
3636
runs-on: [self-hosted, Linux, X64, 2T4]
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Pull CUDA Devel Image
4141
run: |
42-
docker pull wxj6000/gpu4pyscf:latest
42+
docker pull pyscf/gpu4pyscf-devel:latest
4343
4444
- name: Test with pytest
4545
run: |
@@ -48,5 +48,5 @@ jobs:
4848
-e CUPY_CACHE_DIR=/workspace/.cupy_cache \
4949
-e HTTP_PROXY=$HTTP_PROXY \
5050
-e HTTPS_PROXY=$HTTPS_PROXY \
51-
-v $GITHUB_WORKSPACE:/workspace wxj6000/gpu4pyscf:latest \
52-
/bin/bash -c "cd /workspace && source build.sh && pytest -m 'not benchmark' --cov=/workspace && rm -rf .pytest_cache"
51+
-v $GITHUB_WORKSPACE:/workspace pyscf/gpu4pyscf-devel:latest \
52+
/bin/bash -c "cd /workspace && pip3 install --target=/tmp/deps -r requirements.txt && export PYTHONPATH=/tmp/deps:$PYTHONPATH && source build.sh && pytest -m 'not benchmark' --cov=/workspace && rm -rf .pytest_cache"

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ Installation
99
> [!NOTE]
1010
> The compiled binary packages support compute capability 7.0 and later (Volta and later, such as Tesla V100, RTX 20 series and later).
1111
12-
Run ```nvcc --version``` in your terminal to check the installed CUDA toolkit version. Then, choose the proper package based on your CUDA toolkit version.
12+
To check your installed CUDA Toolkit version, run
13+
```sh
14+
nvcc --version
15+
```
16+
Then, install the appropriate package based on your CUDA version:
1317

1418
| Platform | Command | cutensor (**highly recommended**)|
1519
----------------| --------------------------------------|----------------------------------|
1620
| **CUDA 11.x** | ```pip3 install gpu4pyscf-cuda11x``` | ```pip3 install cutensor-cu11``` |
1721
| **CUDA 12.x** | ```pip3 install gpu4pyscf-cuda12x``` | ```pip3 install cutensor-cu12``` |
1822

23+
We **recommend** creating a dedicated environment using:
24+
```sh
25+
pip3 install --no-cache-dir -r requirements.txt
26+
```
27+
This ensures compatibility and reproducibility, especially since this configuration is used in our nightly benchmarks.
28+
1929
Compilation
2030
--------
21-
One can compile the package with
31+
To compile the package, run the following commands:
2232
```sh
2333
git clone https://github.com/pyscf/gpu4pyscf.git
2434
cd gpu4pyscf
@@ -36,8 +46,6 @@ There shouldn't be cupy or cutensor compilation during pip install process. If y
3646
<repo_path>/gpu4pyscf/lib/cutensor.py:<line_number>: UserWarning: using cupy as the tensor contraction engine.
3747
```
3848

39-
The package also provides multiple dockerfiles in ```dockerfiles```. One can use them as references to create the compilation envrionment.
40-
4149
Features
4250
--------
4351
- Density fitting scheme and direct SCF scheme;

dockerfiles/compile/Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

dockerfiles/ubuntu_runtime/Dockerfile renamed to dockerfiles/ubuntu_devel/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
1+
FROM nvidia/cuda:12.4.0-devel-ubuntu22.04
22

33
RUN apt-get update -y && \
44
apt-get install -y --no-install-recommends \
5+
git \
6+
libopenblas-dev \
7+
gfortran \
58
python3-dev \
69
python3-pip \
710
python3-wheel \
@@ -13,5 +16,8 @@ ENV CUDA_HOME="/usr/local/cuda" LD_LIBRARY_PATH="${CUDA_HOME}/lib64::${LD_LIBRAR
1316
RUN echo "export PATH=${CUDA_HOME}/bin:\$PATH" >> /etc/bash.bashrc
1417
RUN echo "export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:\$LD_LIBRARY_PATH" >> /etc/bash.bashrc
1518

16-
RUN pip3 install cutensor-cu11
17-
RUN pip3 install gpu4pyscf-cuda11x
19+
RUN pip3 install cmake
20+
RUN pip3 install pytest
21+
RUN pip3 install pytest-cov
22+
RUN pip3 install pytest-benchmark
23+
RUN pip3 install gpu4pyscf-cuda12x

requirements.txt

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
certifi==2022.9.24
2-
cupy-cuda117==10.6.0
3-
cutensor==1.6.0.3
4-
cutensor-cu11==1.6.1
5-
cutensornet-cu11==2.0.0
6-
Cython==0.29.32
7-
# dftd3==0.7.0
8-
geometric==1.0
9-
h5py==3.7.0
10-
numpy==1.23.5
11-
opt-einsum==3.3.0
12-
pandas==1.5.2
13-
pyarrow==6.0.1
14-
pyscf==2.1.1
15-
pyscf-qsdopt==0.1.0
16-
pytest==7.2.0
17-
pytest-cov==4.0.0
18-
pytest-cover==3.0.0
19-
pytest-coverage==0.0
20-
python-dateutil==2.8.2
21-
python-etcd==0.4.5
22-
python-jose==3.2.0
23-
python-snappy==0.6.1
1+
cutensor-cu12==2.2.0
2+
gpu4pyscf-libxc-cuda12x==0.5.0
3+
cupy-cuda12x==13.4.1
4+
pyscf==2.8.0
5+
basis-set-exchange==0.11
6+
pyscf-dispersion==1.3.0
7+
geometric==1.1.0

0 commit comments

Comments
 (0)