Skip to content

Commit

Permalink
Merge pull request #2824 from davidlange6/tensorflow
Browse files Browse the repository at this point in the history
add tensor flow package
  • Loading branch information
davidlange6 committed Feb 14, 2017
2 parents b2b109d + d26f1a1 commit d181c1b
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 40 deletions.
1 change: 0 additions & 1 deletion cmssw-tool-conf.spec
Expand Up @@ -145,7 +145,6 @@ Requires: gdb-toolfile
Requires: file-toolfile
Requires: libxslt-toolfile
Requires: py2-six-toolfile
Requires: py2-pyparsing-toolfile
Requires: giflib-toolfile
Requires: freetype-toolfile
Requires: utm-toolfile
Expand Down
5 changes: 5 additions & 0 deletions py2-Keras.spec
Expand Up @@ -6,3 +6,8 @@
Requires: py2-PyYAML py2-six py2-scipy py2-Theano py2-numpy
## IMPORT build-with-pip


%define PipPostBuild \
perl -p -i -e "s|# Default backend: TensorFlow.|# Default backend: Theano.|" %{i}/lib/python2.7/site-packages/keras/backend/__init__.py; \
perl -p -i -e "s|_BACKEND = 'tensorflow'|_BACKEND = 'theano'|" %{i}/lib/python2.7/site-packages/keras/backend/__init__.py

9 changes: 9 additions & 0 deletions py2-funcsigs.spec
@@ -0,0 +1,9 @@
### RPM external py2-funcsigs 1.0.2
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES


%define pip_name funcsigs


## IMPORT build-with-pip

8 changes: 8 additions & 0 deletions py2-mock.spec
@@ -0,0 +1,8 @@
### RPM external py2-mock 2.0.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES


%define pip_name mock
Requires: py2-six py2-funcsigs py2-pbr
## IMPORT build-with-pip

11 changes: 11 additions & 0 deletions py2-pbr.spec
@@ -0,0 +1,11 @@
### RPM external py2-pbr 1.10.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES


%define pip_name pbr


## IMPORT build-with-pip

%define PipPostBuild \
perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/pbr
6 changes: 3 additions & 3 deletions py2-pippkgs.spec
@@ -1,10 +1,9 @@
### RPM external py2-pippkgs 2.0
### RPM external py2-pippkgs 3.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES
Source: none

Requires: root curl python

BuildRequires: py2-rootpy
BuildRequires: py2-configparser
BuildRequires: py2-entrypoints
BuildRequires: py2-psutil
Expand Down Expand Up @@ -66,13 +65,14 @@ BuildRequires: py2-pycurl
BuildRequires: py2-pytz
BuildRequires: py2-requests
BuildRequires: py2-schema
BuildRequires: py2-scikit-learn
BuildRequires: py2-Jinja
BuildRequires: py2-python-dateutil
BuildRequires: py2-cjson
BuildRequires: py2-enum34
BuildRequires: py2-shutil_get_terminal_size
BuildRequires: py2-functools32
BuildRequires: py2-mock
BuildRequires: py2-pbr

%prep

Expand Down
12 changes: 11 additions & 1 deletion py2-pippkgs_depscipy.spec
@@ -1,11 +1,21 @@
### RPM external py2-pippkgs_depscipy 1.0
### RPM external py2-pippkgs_depscipy 2.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES
Source: none

Requires: root curl python py2-scipy

%define isslc7 %(case %{cmsplatf} in (slc7_amd64*) echo 1 ;; (*) echo 0 ;; esac)


BuildRequires: py2-Keras
BuildRequires: py2-Theano
BuildRequires: py2-scikit-learn
BuildRequires: py2-rootpy
%if %isslc7
BuildRequires: py2-tensorflow
%endif
BuildRequires: py2-protobuf


%prep

Expand Down
8 changes: 8 additions & 0 deletions py2-protobuf.spec
@@ -0,0 +1,8 @@
### RPM external py2-protobuf 3.2.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES


%define pip_name protobuf
Requires: py2-six py2-packaging py2-setuptools py2-pyparsing py2-appdirs
## IMPORT build-with-pip

23 changes: 0 additions & 23 deletions py2-pyparsing-toolfile.spec

This file was deleted.

17 changes: 5 additions & 12 deletions py2-pyparsing.spec
@@ -1,16 +1,9 @@
### RPM external py2-pyparsing 2.0.3
### RPM external py2-pyparsing 2.1.10
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES
%define my_name %(echo %n | cut -f2 -d-)
Source: http://downloads.sourceforge.net/project/%{my_name}/%{my_name}/%{my_name}-%{realversion}/%{my_name}-%{realversion}.zip
Requires: python
BuildRequires: py2-setuptools

%prep
%setup -n %{my_name}-%{realversion}

%build
python setup.py build
%define pip_name pyparsing


## IMPORT build-with-pip

%install
python setup.py install --skip-build --prefix=%{i}
find %{i}/${PYTHON_LIB_SITE_PACKAGES} -name '*.egg-info' -type d -print0 | xargs -0 rm -rf
13 changes: 13 additions & 0 deletions py2-tensorflow.spec
@@ -0,0 +1,13 @@
### RPM external py2-tensorflow 0.12.1
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES

# nothing on pypi is ok for tensorflow at this point
%define tensorflowSource https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
%define PipDownloadOptions ALTSRC%%20%tensorflowSource%%20--no-deps%%20--no-binary%%3D:none:
%define pip_name tensorflow
Requires: py2-funcsigs py2-protobuf py2-pbr py2-six py2-packaging py2-appdirs py2-setuptools py2-pyparsing py2-numpy py2-mock
## IMPORT build-with-pip

%define PipPostBuild \
perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/tensorboard

0 comments on commit d181c1b

Please sign in to comment.