Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
aws pip package (#118)
Browse files Browse the repository at this point in the history
Added support for a rl-coach-slim package.
  • Loading branch information
shadiendrawis authored and galnov committed Nov 19, 2018
1 parent 3817cef commit ff816b3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ include rl_coach/environments/doom/*.wad
include rl_coach/environments/mujoco/common/*.xml
include rl_coach/environments/mujoco/*.xml
include rl_coach/environments/*.ini
include rl_coach/tests/*.ini
include rl_coach/tests/*.ini
include requirements.txt
27 changes: 17 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
# 3. Run `python setup.py sdist`
# 4. Run `twine upload dist/*`

slim_package = False # if true build aws package with partial dependencies, otherwise, build full package

here = path.abspath(path.dirname(__file__))

Expand All @@ -49,26 +50,32 @@

install_requires = list()
extras = dict()
excluded_packages = ['wxPython', 'kubernetes', 'tensorflow'] if slim_package else []

with open(path.join(here, 'requirements.txt'), 'r') as f:
for line in f:
install_requires.append(line.strip())
package = line.strip()
if any(p in package for p in excluded_packages):
continue
install_requires.append(package)

# check if system has CUDA enabled GPU
p = subprocess.Popen(['command -v nvidia-smi'], stdout=subprocess.PIPE, shell=True)
out = p.communicate()[0].decode('UTF-8')
using_GPU = out != ''

if not using_GPU:
# For linux wth no GPU, we install the Intel optimized version of TensorFlow
if sys.platform == "linux" or sys.platform == "linux2":
subprocess.check_call(['pip install '
'https://storage.googleapis.com/intel-optimized-tensorflow/tensorflow-1.11.0-cp35-cp35m-linux_x86_64.whl'],
shell=True)
install_requires.append('tensorflow>=1.9.0')
if not slim_package:
# For linux wth no GPU, we install the Intel optimized version of TensorFlow
if sys.platform == "linux" or sys.platform == "linux2":
subprocess.check_call(['pip install '
'https://storage.googleapis.com/intel-optimized-tensorflow/tensorflow-1.11.0-cp35-cp35m-linux_x86_64.whl'],
shell=True)
install_requires.append('tensorflow>=1.9.0')
extras['mxnet'] = ['mxnet-mkl>=1.3.0']
else:
install_requires.append('tensorflow-gpu>=1.9.0')
if not slim_package:
install_requires.append('tensorflow-gpu>=1.9.0')
extras['mxnet'] = ['mxnet-cu90mkl>=1.3.0']

all_deps = []
Expand All @@ -78,8 +85,8 @@


setup(
name='rl-coach',
version='0.10.0',
name='rl-coach' if not slim_package else 'rl-coach-slim',
version='0.11.0',
description='Reinforcement Learning Coach enables easy experimentation with state of the art Reinforcement Learning algorithms.',
url='https://github.com/NervanaSystems/coach',
author='Intel AI Lab',
Expand Down

0 comments on commit ff816b3

Please sign in to comment.