Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
70c94fb
add tensorflow
May 2, 2019
841f97f
make bazel and tensorflow build
healther Oct 11, 2019
2e7110d
fix flake8
healther Oct 11, 2019
06e50d6
2nd flake8 attempt
healther Oct 14, 2019
00c9e2d
replace md5 sums with sha256
Nov 26, 2019
060fe56
add version 1.13.2
Nov 26, 2019
fa7a144
bazel() -> bazel('build',...
Nov 26, 2019
011a366
specify versions of bazel dependency
Nov 26, 2019
8e451d6
build with CUDA
Nov 26, 2019
7a9ec3d
add TODOs
Nov 26, 2019
028cfea
add more todo"s
Nov 26, 2019
ee3e3c2
improve enum34 dependency
Nov 26, 2019
d8bb8ad
py-future is a dependency as of v1.14
Nov 26, 2019
b2f9c15
Update var/spack/repos/builtin/packages/tensorflow/package.py
Sinan81 Nov 26, 2019
c32afab
Update var/spack/repos/builtin/packages/tensorflow/package.py
Sinan81 Nov 26, 2019
2e24148
Update var/spack/repos/builtin/packages/tensorflow/package.py
Sinan81 Nov 26, 2019
a58aabe
Update var/spack/repos/builtin/packages/tensorflow/package.py
Sinan81 Nov 26, 2019
b5db8ca
enable nccl, cuda by default
Nov 26, 2019
d6bb016
explain patches
Nov 26, 2019
514c892
add todo
Nov 26, 2019
3dafee3
remove unnecessary copt_flag
Nov 26, 2019
56991c5
use join
Nov 26, 2019
4d1f102
join argument must be an iterable
Nov 27, 2019
7a65b9c
split long line; use same opts for non-cuda build
Nov 29, 2019
714077f
without opt flags, configure hangs
Nov 30, 2019
646533c
introduce build phases; re-arrange
Nov 30, 2019
d133f59
undo mistake
Nov 30, 2019
15c0139
restore unset tmp_path
Nov 30, 2019
f327d39
as of v1.14, nccl_install_path is parsed correctly, hence change ...p…
Nov 30, 2019
c09ad95
now, version 1.14 compiles successfully with cuda
Nov 30, 2019
9cc99da
add version 2.1.0
Nov 30, 2019
c46163c
specify bazel dependency for version 2.1.0-rc0
Nov 30, 2019
315472c
account for deprecated bazel opts for v2.1.0-rc0
Nov 30, 2019
be372f5
disable mkldnn contraction kernel
Nov 30, 2019
ae63835
Flake8 fixes
adamjstewart Nov 30, 2019
795fb70
md5 -> sha256
adamjstewart Nov 30, 2019
136ece9
Fix TF and TF-estimator version deps
adamjstewart Nov 30, 2019
871f22c
Don't just comment out patch
adamjstewart Nov 30, 2019
e699227
Add myself as a maintainer
adamjstewart Nov 30, 2019
1e305d6
Patch py-astor to support newer py-setuptools
adamjstewart Dec 1, 2019
2facfd0
Add more versions and bazel version constraints
adamjstewart Dec 1, 2019
ccf27af
Add a build phase
adamjstewart Dec 1, 2019
d494d00
Add note about configure interactivity
adamjstewart Dec 1, 2019
8844df4
dev-build -> build-env
adamjstewart Dec 1, 2019
6abecce
Disable iOS build
adamjstewart Dec 1, 2019
c263342
Use correct optimization flags
adamjstewart Dec 1, 2019
38fdf22
Add variants for all possible features
adamjstewart Dec 1, 2019
d4c4a98
nccl isn't always a dependency
adamjstewart Dec 1, 2019
64f39f5
Specify correct dependency versions for each release
adamjstewart Dec 2, 2019
e36996a
Libs may not be in lib or lib64
adamjstewart Dec 2, 2019
52d7017
Add py-opt-einsum package
adamjstewart Dec 2, 2019
465409e
Add newer version of py-protobuf
adamjstewart Dec 2, 2019
20234d2
Add newer version of py-wrapt
adamjstewart Dec 2, 2019
1146329
Fix Python 2.6 syntax error
adamjstewart Dec 2, 2019
dc1be46
Code review
adamjstewart Dec 2, 2019
9cdfbb2
Set more env vars for older versions
adamjstewart Dec 2, 2019
f6ca269
Add more env vars, fix bazel versions, add conflicts
adamjstewart Dec 3, 2019
bd573ba
Fix config options
adamjstewart Dec 3, 2019
ab8a543
Specify version that support --config args
adamjstewart Dec 3, 2019
14acab6
Add py-future dependency for Python 2
adamjstewart Dec 4, 2019
2ce5454
Fix cuda config flag and compute capabilities
adamjstewart Dec 4, 2019
c71831b
Fix installation on macOS, add unit tests
adamjstewart Dec 4, 2019
e22e02f
Override cuda variant default to True on non-macOS
adamjstewart Dec 4, 2019
81c9eef
Rename tensorflow to py-tensorflow
adamjstewart Dec 4, 2019
0d8e96c
Has to extend something
adamjstewart Dec 4, 2019
eed94b6
Fix os.symlink call
adamjstewart Dec 4, 2019
9be8ff6
convert cuda_arc values to capabilities
Dec 4, 2019
24b158a
restore nccl prefix path for v1.13.1
Dec 4, 2019
3cbd246
Revert to v2
adamjstewart Dec 4, 2019
2864d35
Remove extraneous period
adamjstewart Dec 4, 2019
d4c4f2f
Add new version of jdk/openjdk
adamjstewart Dec 4, 2019
bbb9a30
More stable cuda_arch formatting
adamjstewart Dec 4, 2019
a01c782
Fix bazel unit tests
adamjstewart Dec 5, 2019
5ba8dd9
Fix symlinking
adamjstewart Dec 5, 2019
e5d1c24
Fix unit tests
adamjstewart Dec 5, 2019
efcd036
+gcp by default until build error figured out
adamjstewart Dec 5, 2019
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
12 changes: 9 additions & 3 deletions var/spack/repos/builtin/packages/bazel/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Bazel(Package):

maintainers = ['adamjstewart']

version('1.2.1', sha256='255da49d0f012bc4f2c1d6d3ccdbe578e22fe97b8d124e1629a486fe2a09d3e1')
version('1.2.0', sha256='9cb46b0a18b9166730307a0e82bf4c02281a1cc6da0fb11239e6fe4147bdee6e')
version('1.1.0', sha256='4b66a8c93af7832ed32e7236cf454a05f3aa06d25a8576fc3f83114f142f95ab')
version('1.0.1', sha256='f4d2dfad011ff03a5fae41b9b02cd96cd7297c1205d496603d66516934fbcfee')
Expand Down Expand Up @@ -122,7 +123,9 @@ def url_for_version(self, version):
return url.format(version)

def setup_build_environment(self, env):
env.set('EXTRA_BAZEL_ARGS', '--host_javabase=@local_jdk//:jdk')
env.set('EXTRA_BAZEL_ARGS',
# Spack's logs don't handle colored output well
'--color=no --host_javabase=@local_jdk//:jdk')

def bootstrap(self, spec, prefix):
bash = which('bash')
Expand All @@ -137,7 +140,8 @@ def install(self, spec, prefix):
def test(self):
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/bazel.rb

with working_dir('spack-test', create=True):
# Bazel does not work properly on NFS, switch to /tmp
with working_dir('/tmp/spack/bazel/spack-test', create=True):
touch('WORKSPACE')

with open('ProjectRunner.java', 'w') as f:
Expand All @@ -156,8 +160,10 @@ def test(self):
main_class = "ProjectRunner",
)""")

# Spack's logs don't handle colored output well
bazel = Executable(self.prefix.bin.bazel)
bazel('build', '//:bazel-test')
bazel('--output_user_root=/tmp/spack/bazel/spack-test',
'build', '--color=no', '//:bazel-test')

exe = Executable('bazel-bin/bazel-test')
assert exe(output=str) == 'Hi!\n'
Expand Down
1 change: 0 additions & 1 deletion var/spack/repos/builtin/packages/icedtea/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class Icedtea(AutotoolsPackage):
depends_on('zlib')
depends_on('alsa-lib')

provides('java')
provides('java@8', when='@3.4.0:3.99.99')

force_autoreconf = True
Expand Down
2 changes: 2 additions & 0 deletions var/spack/repos/builtin/packages/jdk/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Jdk(Package):
url='http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz')
version('10.0.1_10', sha256='ae8ed645e6af38432a56a847597ac61d4283b7536688dbab44ab536199d1e5a4', curl_options=curl_options,
url='http://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz')
version('1.8.0_231-b11', sha256='a011584a2c9378bf70c6903ef5fbf101b30b08937441dc2ec67932fb3620b2cf', curl_options=curl_options,
url='https://download.oracle.com/otn/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-linux-x64.tar.gz')
version('1.8.0_212-b10', sha256='3160c50aa8d8e081c8c7fe0f859ea452922eca5d2ae8f8ef22011ae87e6fedfb', curl_options=curl_options,
url='https://download.oracle.com/otn/java/jdk/8u212-b10/59066701cf1a433da9770636fbc4c9aa/jdk-8u212-linux-x64.tar.gz')
version('1.8.0_202-b08', sha256='9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0', curl_options=curl_options,
Expand Down
28 changes: 9 additions & 19 deletions var/spack/repos/builtin/packages/openjdk/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@ class Openjdk(Package):

homepage = "https://jdk.java.net"

version(
"11.0.2",
sha256="99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57",
url="https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz",
)

version(
"11.0.1",
sha256="7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd",
url="https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz",
)

version(
"1.8.0_202-b08",
sha256="533dcd8d9ca15df231a1eb392fa713a66bca85a8e76d9b4ee30975f3823636b7",
url="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.0.tar.gz",
)

provides('java')
version("11.0.2", sha256="99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57",
url="https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz")
version("11.0.1", sha256="7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd",
url="https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz")
version("1.8.0_202-b08", sha256="533dcd8d9ca15df231a1eb392fa713a66bca85a8e76d9b4ee30975f3823636b7",
url="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.0.tar.gz")
version('1.8.0_40-b25', sha256='79e96dce03a14271040023231a7d0ae374b755d48adf68bbdaec30294e4e2b88',
url='https://download.java.net/openjdk/jdk8u40/ri/jdk_ri-8u40-b25-linux-x64-10_feb_2015.tar.gz')

provides('java@11', when='@11.0:11.99')
provides('java@8', when='@1.8.0:1.8.999')

Expand Down
15 changes: 10 additions & 5 deletions var/spack/repos/builtin/packages/py-astor/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ class PyAstor(PythonPackage):
url = "https://pypi.io/packages/source/a/astor/astor-0.8.0.tar.gz"

version('0.8.0', sha256='37a6eed8b371f1228db08234ed7f6cfdc7817a3ed3824797e20cbb11dc2a7862')
version('0.6', sha256='175ec395cde36aa0178c5a3120d03954c65d1ef4bb19ec4aa30e9d7a7cc426c4')
version('0.6', sha256='175ec395cde36aa0178c5a3120d03954c65d1ef4bb19ec4aa30e9d7a7cc426c4')

depends_on('[email protected]:2.8,3.4:')
# Build fails with [email protected]
# https://github.com/berkerpeksag/astor/issues/162
depends_on('py-setuptools@:41.3', type='build')
depends_on('[email protected]:2.8,3.4:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-nose', type='test')
depends_on('py-astunparse', type='test')

# Build fails with newer versions of setuptools
# https://github.com/berkerpeksag/astor/issues/162
# https://github.com/berkerpeksag/astor/pull/163
patch('https://github.com/berkerpeksag/astor/pull/163/commits/30059dac4eb832e58ab2109db84508b294ba366d.patch',
sha256='edc5eeddabe153b08e938f52edaeb2d880ee3128082967f310db0f98510fe6e0',
when='@0.8.0')
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PyBackportsWeakref(PythonPackage):
homepage = "https://github.com/PiDelport/backports.weakref"
url = "https://pypi.org/packages/source/b/backports.weakref/backports.weakref-1.0.post1.tar.gz"

version('1.0.post1', sha256='bc4170a29915f8b22c9e7c4939701859650f2eb84184aee80da329ac0b9825c2')
version('1.0.post1', sha256='bc4170a29915f8b22c9e7c4939701859650f2eb84184aee80da329ac0b9825c2', preferred=True)
version('1.0rc1', sha256='8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892')

depends_on('py-setuptools', type='build')
1 change: 1 addition & 0 deletions var/spack/repos/builtin/packages/py-gast/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class PyGast(PythonPackage):
url = "https://pypi.io/packages/source/g/gast/gast-0.3.2.tar.gz"

version('0.3.2', sha256='5c7617f1f6c8b8b426819642b16b9016727ddaecd16af9a07753e537eba8a3a5')
version('0.2.2', sha256='fe939df4583692f0512161ec1c880e0a10e71e6a232da045ab8edd3756fbadf0')
version('0.2.0', sha256='7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930')

depends_on('py-setuptools', type='build')
22 changes: 22 additions & 0 deletions var/spack/repos/builtin/packages/py-opt-einsum/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class PyOptEinsum(PythonPackage):
"""Optimized Einsum: A tensor contraction order optimizer."""

homepage = "https://github.com/dgasmith/opt_einsum"
url = "https://pypi.io/packages/source/o/opt_einsum/opt_einsum-3.1.0.tar.gz"

version('3.1.0', sha256='edfada4b1d0b3b782ace8bc14e80618ff629abf53143e1e6bbf9bd00b11ece77')

depends_on('[email protected]:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('[email protected]:', type=('build', 'run'))
depends_on('py-pytest', type='test')
depends_on('py-pytest-cov', type='test')
depends_on('py-pytest-pep8', type='test')
19 changes: 19 additions & 0 deletions var/spack/repos/builtin/packages/py-pep8/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class PyPep8(PythonPackage):
"""Python style guide checker (deprecated, use py-pycodestyle instead)."""

homepage = "https://pep8.readthedocs.org/"
url = "https://pypi.io/packages/source/p/pep8/pep8-1.7.1.tar.gz"

import_modules = ['pep8']

version('1.7.1', sha256='fe249b52e20498e59e0b5c5256aa52ee99fc295b26ec9eaa85776ffdb9fe6374')

depends_on('py-setuptools', type=('build', 'run'))
37 changes: 25 additions & 12 deletions var/spack/repos/builtin/packages/py-protobuf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,42 @@ class PyProtobuf(PythonPackage):
and using a variety of languages."""

homepage = 'https://developers.google.com/protocol-buffers/'
url = 'https://pypi.io/packages/source/p/protobuf/protobuf-3.7.1.tar.gz'
url = 'https://pypi.io/packages/source/p/protobuf/protobuf-3.11.0.tar.gz'

variant('cpp', default=False,
description='Enable the cpp implementation')

version('3.7.1', sha256='21e395d7959551e759d604940a115c51c6347d90a475c9baf471a1a86b5604a9')
version('3.6.1', sha256='1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811')
version('3.6.0', sha256='a37836aa47d1b81c2db1a6b7a5e79926062b5d76bd962115a0e615551be2b48d')
version('3.5.2', sha256='09879a295fd7234e523b62066223b128c5a8a88f682e3aff62fb115e4a0d8be0')
version('3.5.1', sha256='95b78959572de7d7fafa3acb718ed71f482932ddddddbd29ba8319c10639d863')
version('3.4.0', sha256='ef02609ef445987976a3a26bff77119c518e0915c96661c3a3b17856d0ef6374')
version('3.3.0', sha256='1cbcee2c45773f57cb6de7ee0eceb97f92b9b69c0178305509b162c0160c1f04')
version('2.6.1', sha256='8faca1fb462ee1be58d00f5efb4ca4f64bde92187fe61fde32615bbee7b3e745')
version('2.5.0', sha256='58292c459598c9297258bf57acc055f701c727f0154a86af8c0947dde37d8172')
version('2.4.1', sha256='df30b98acb6ef892da8b4776175510cff2131908fd0526b6bad960c55a830a1b')
version('2.3.0', sha256='374bb047874a506507912c3717d0ce62affbaa9a22bcb494d63d60326a0867b5')
version('3.11.0', sha256='97b08853b9bb71512ed52381f05cf2d4179f4234825b505d8f8d2bb9d9429939')
version('3.7.1', sha256='21e395d7959551e759d604940a115c51c6347d90a475c9baf471a1a86b5604a9')
version('3.6.1', sha256='1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811')
version('3.6.0', sha256='a37836aa47d1b81c2db1a6b7a5e79926062b5d76bd962115a0e615551be2b48d')
version('3.5.2', sha256='09879a295fd7234e523b62066223b128c5a8a88f682e3aff62fb115e4a0d8be0')
version('3.5.1', sha256='95b78959572de7d7fafa3acb718ed71f482932ddddddbd29ba8319c10639d863')
version('3.4.0', sha256='ef02609ef445987976a3a26bff77119c518e0915c96661c3a3b17856d0ef6374')
version('3.3.0', sha256='1cbcee2c45773f57cb6de7ee0eceb97f92b9b69c0178305509b162c0160c1f04')
version('3.1.0', sha256='0bc10bfd00a9614fae58c86c21fbcf339790e48accf6d45f098034de985f5405',
url='https://github.com/protocolbuffers/protobuf/releases/download/v3.1.0/protobuf-python-3.1.0.tar.gz')
version('3.0.0', sha256='ecc40bc30f1183b418fe0ec0c90bc3b53fa1707c4205ee278c6b90479e5b6ff5')
version('3.0.0b2', sha256='d5b560bbc4b7d97cc2455c05cad9299d9db02d7bd11193b05684e3a86303c229')
version('3.0.0a3', sha256='b61622de5048415bfd3f2d812ad64606438ac9e25009ae84191405fe58e522c1')
version('2.6.1', sha256='8faca1fb462ee1be58d00f5efb4ca4f64bde92187fe61fde32615bbee7b3e745')
version('2.5.0', sha256='58292c459598c9297258bf57acc055f701c727f0154a86af8c0947dde37d8172')
version('2.4.1', sha256='df30b98acb6ef892da8b4776175510cff2131908fd0526b6bad960c55a830a1b')
version('2.3.0', sha256='374bb047874a506507912c3717d0ce62affbaa9a22bcb494d63d60326a0867b5')

depends_on('py-setuptools', type=('build', 'run'))
depends_on('[email protected]:', when='@3:', type=('build', 'run'))
depends_on('py-ordereddict', when='@3: ^python@:2', type=('build', 'run'))
depends_on('py-unittest2', when='@3: ^python@:2', type=('build', 'run'))
depends_on('protobuf', when='+cpp')

@property
def build_directory(self):
if self.spec.satisfies('@3.1.0'):
return 'python'
else:
return '.'

@when('+cpp')
def build_args(self, spec, prefix):
return ['--cpp_implementation']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class PyPytestCache(PythonPackage):
version('1.0', sha256='be7468edd4d3d83f1e844959fd6e3fd28e77a481440a7118d430130ea31b07a9')

depends_on('py-setuptools', type='build')
depends_on('[email protected].0:2.7.3', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
22 changes: 22 additions & 0 deletions var/spack/repos/builtin/packages/py-pytest-pep8/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class PyPytestPep8(PythonPackage):
"""pytest plugin for efficiently checking PEP8 compliance"""

homepage = "https://bitbucket.org/pytest-dev/pytest-pep8"
url = "https://pypi.io/packages/source/p/pytest-pep8/pytest-pep8-1.0.6.tar.gz"

import_modules = ['pytest_pep8']

version('1.0.6', sha256='032ef7e5fa3ac30f4458c73e05bb67b0f036a8a5cb418a534b3170f89f120318')

depends_on('py-setuptools', type='build')
depends_on('py-pytest-cache', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class PyTensorflowEstimator(Package):
"""TensorFlow Estimator is a high-level TensorFlow API that greatly
simplifies machine learning programming."""

homepage = "https://github.com/tensorflow/estimator"
url = "https://github.com/tensorflow/estimator/archive/v1.13.0.tar.gz"

version('2.0.0', sha256='6f4bdf1ab219e1f1cba25d2af097dc820f56479f12a839853d97422fe4d8b465')
version('1.13.0', sha256='a787b150ff436636df723e507019c72a5d6486cfe506886279d380166953f12f', preferred=True)

extends('python')

depends_on('[email protected]', when='@2.0.0')
depends_on('[email protected]', when='@1.13.0')

depends_on('[email protected]', type='build')
depends_on('py-pip', type='build')
depends_on('[email protected]:', type=('build', 'run'))

def install(self, spec, prefix):
tmp_path = join_path(env.get('SPACK_TMPDIR', '/tmp/spack'),
'tf-estimator',
self.module.site_packages_dir[1:])
mkdirp(tmp_path)
env['TEST_TMPDIR'] = tmp_path
env['HOME'] = tmp_path

# bazel uses system PYTHONPATH instead of spack paths
bazel('--action_env', 'PYTHONPATH={0}'.format(env['PYTHONPATH']),
'//tensorflow_estimator/tools/pip_package:build_pip_package')

build_pip_package = Executable(join_path(
'bazel-bin/tensorflow_estimator/tools',
'pip_package/build_pip_package'))
build_pip_package(tmp_path)

pip = Executable('pip')
pip('install', '--prefix={0}'.format(prefix),
'--find-links={0}'.format(tmp_path), 'tensorflow-estimator')
21 changes: 21 additions & 0 deletions var/spack/repos/builtin/packages/py-tensorflow/crosstool.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
+++ tensorflow-1.0.0-rc2/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl 2017-02-15 20:40:47.633496842 +0100
--- tensorflow-1.0.0-rc2/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl 2017-02-08 19:32:14.000000000 +0100
@@ -46,13 +46,13 @@ import sys
import pipes

# Template values set by cuda_autoconf.
-CPU_COMPILER = ('%{cpu_compiler}')
-GCC_HOST_COMPILER_PATH = ('%{gcc_host_compiler_path}')
+CPU_COMPILER = os.environ['SPACK_CC']
+GCC_HOST_COMPILER_PATH = CPU_COMPILER

CURRENT_DIR = os.path.dirname(sys.argv[0])
NVCC_PATH = CURRENT_DIR + '/../../../cuda/bin/nvcc'
-LLVM_HOST_COMPILER_PATH = ('/usr/bin/gcc')
-PREFIX_DIR = os.path.dirname(GCC_HOST_COMPILER_PATH)
+LLVM_HOST_COMPILER_PATH = os.environ['SPACK_CC']
+PREFIX_DIR = os.path.dirname(os.environ['SPACK_CC'])
NVCC_VERSION = '%{cuda_version}'

def Log(s):

57 changes: 57 additions & 0 deletions var/spack/repos/builtin/packages/py-tensorflow/http_archive.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
diff --git a/WORKSPACE b/WORKSPACE
index 1796182..84b5eab 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,5 +1,7 @@
workspace(name = "org_tensorflow")

+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
+
http_archive(
name = "io_bazel_rules_closure",
sha256 = "a38539c5b5c358548e75b44141b4ab637bba7c4dc02b46b1f62a96d6433f56ae",
@@ -30,7 +32,7 @@ android_workspace()
# Please add all new TensorFlow dependencies in workspace.bzl.
tf_workspace()

-new_http_archive(
+http_archive(
name = "inception_v1",
build_file = "models.BUILD",
sha256 = "7efe12a8363f09bc24d7b7a450304a15655a57a7751929b2c1593a71183bb105",
@@ -40,7 +42,7 @@ new_http_archive(
],
)

-new_http_archive(
+http_archive(
name = "mobile_ssd",
build_file = "models.BUILD",
sha256 = "bddd81ea5c80a97adfac1c9f770e6f55cbafd7cce4d3bbe15fbeb041e6b8f3e8",
@@ -50,7 +52,7 @@ new_http_archive(
],
)

-new_http_archive(
+http_archive(
name = "mobile_multibox",
build_file = "models.BUILD",
sha256 = "859edcddf84dddb974c36c36cfc1f74555148e9c9213dedacf1d6b613ad52b96",
@@ -60,7 +62,7 @@ new_http_archive(
],
)

-new_http_archive(
+http_archive(
name = "stylize",
build_file = "models.BUILD",
sha256 = "3d374a730aef330424a356a8d4f04d8a54277c425e274ecb7d9c83aa912c6bfa",
@@ -70,7 +72,7 @@ new_http_archive(
],
)

-new_http_archive(
+http_archive(
name = "speech_commands",
build_file = "models.BUILD",
sha256 = "c3ec4fea3158eb111f1d932336351edfe8bd515bb6e87aad4f25dbad0a600d0c",
Loading