Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ jobs:
tf: 1.14
- python: 3.7
gcc: 5
tf: 2.3
tf: 2.*
- python: 3.7
gcc: 8
tf: 2.3
tf: 2.*
- python: 3.8
gcc: 5
tf: 2.3
tf: 2.*
- python: 3.8
gcc: 8
tf: 2.3
tf: 2.*

steps:
- uses: actions/checkout@master
Expand Down
6 changes: 3 additions & 3 deletions doc/install/install-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ We follow the virtual environment approach to install the tensorflow's Python in
virtualenv -p python3 $tensorflow_venv
source $tensorflow_venv/bin/activate
pip install --upgrade pip
pip install --upgrade tensorflow==2.3.0
pip install --upgrade tensorflow
```
It is notice that everytime a new shell is started and one wants to use `DeePMD-kit`, the virtual environment should be activated by
```bash
Expand All @@ -43,7 +43,7 @@ virtualenv -p python3.7 $tensorflow_venv
```
If one does not need the GPU support of deepmd-kit and is concerned about package size, the CPU-only version of tensorflow should be installed by
```bash
pip install --upgrade tensorflow-cpu==2.3.0
pip install --upgrade tensorflow-cpu
```
To verify the installation, run
```bash
Expand Down Expand Up @@ -149,4 +149,4 @@ dp_ipi dp_ipi_low
$ ls $deepmd_root/lib
libdeepmd_cc_low.so libdeepmd_ipi_low.so libdeepmd_lmp_low.so libdeepmd_low.so libdeepmd_op_cuda.so libdeepmd_op.so
libdeepmd_cc.so libdeepmd_ipi.so libdeepmd_lmp.so libdeepmd_op_cuda_low.so libdeepmd_op_low.so libdeepmd.so
```
```
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
readme_file = Path(__file__).parent / "README.md"
readme = readme_file.read_text()

tf_version = os.environ.get("TENSORFLOW_VERSION", "2.3")
tf_version = os.environ.get("TENSORFLOW_VERSION", "")

if tf_version in SpecifierSet("<1.15") or tf_version in SpecifierSet(">=2.0,<2.1"):
if tf_version == "":
extras_require = {
"cpu": ["tensorflow-cpu"],
"gpu": ["tensorflow"],
}
elif tf_version in SpecifierSet("<1.15") or tf_version in SpecifierSet(">=2.0,<2.1"):
extras_require = {
"cpu": [f"tensorflow=={tf_version}"],
"gpu": [f"tensorflow-gpu=={tf_version}"],
Expand Down