Skip to content

Commit

Permalink
Bugfix in setup.py: don't break when nvidia-smi does not exist (opena…
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGleave authored and araffin committed Mar 22, 2019
1 parent 06f5843 commit 76e6d2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Pre-release 2.4.2a (WIP)
- fixed bug in saving and loading ddpg model when using normalization of obs or returns (@tperol)
- changed DDPG default buffer size from 100 to 50000.
- fixed a bug in ``ddpg.py`` in ``combined_stats`` for eval. Computed mean on ``eval_episode_rewards`` and ``eval_qs``
- fixed a bug in ``setup.py`` that would error on non-GPU systems without TensorFlow installed


Release 2.4.1 (2019-02-11)
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
install_tf = True
# Check if a nvidia gpu is present
for command in ['nvidia-smi', '/usr/bin/nvidia-smi', 'nvidia-smi.exe']:
if subprocess.call([command]) == 0:
tf_gpu = True
break
try:
if subprocess.call([command]) == 0:
tf_gpu = True
break
except IOError: # command does not exist / is not executable
pass

tf_dependency = []
if install_tf:
Expand Down

0 comments on commit 76e6d2f

Please sign in to comment.