Skip to content

Commit 5c2d8d2

Browse files
author
Yunqi Shao
committed
Workaround RTD building issue by using cpu version of TensorFlow
Using the hack from readthedocs/readthedocs.org#5512
1 parent aef1d8a commit 5c2d8d2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.readthedocs.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ formats: []
1111
python:
1212
version: 3.7
1313
install:
14-
- requirements: doc/requirements.txt
1514
- requirements: requirements-dev.txt
1615
- path: .

doc/requirements.txt

-1
This file was deleted.

setup.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
import os
12
from setuptools import setup, find_packages
23

4+
on_rtd = os.environ.get('READTHEDOCS') == 'True'
5+
if on_rtd:
6+
INSTALL_REQUIRES = ['ase', 'numpy', 'pyyaml', 'tensorflow-cpu==1.15']
7+
else:
8+
INSTALL_REQUIRES = ['ase', 'numpy', 'pyyaml', 'tensorflow==1.15']
9+
310
setup(name='pinn',
411
version='dev',
512
description='Pair interaction neural network',
@@ -8,7 +15,7 @@
815
author_email='[email protected]',
916
license='BSD',
1017
packages=find_packages(),
11-
install_requires=['ase', 'numpy', 'pyyaml', 'tensorflow==1.15'],
18+
install_requires=INSTALL_REQUIRES,
1219
entry_points={
1320
'console_scripts': ['pinn_train=pinn.trainer:main']
1421
}

0 commit comments

Comments
 (0)