TensorFlow: don't override HOME env var (#14054)
This commit is contained in:
parent
919a5421b7
commit
23faffa2d0
@ -487,9 +487,6 @@ def setup_build_environment(self, env):
|
|||||||
tmp_path = '/tmp/spack/tf'
|
tmp_path = '/tmp/spack/tf'
|
||||||
mkdirp(tmp_path)
|
mkdirp(tmp_path)
|
||||||
env.set('TEST_TMPDIR', tmp_path)
|
env.set('TEST_TMPDIR', tmp_path)
|
||||||
# TODO: Is setting this necessary? It breaks `spack build-env`
|
|
||||||
# because Bash can't find my .bashrc
|
|
||||||
env.set('HOME', tmp_path)
|
|
||||||
|
|
||||||
def configure(self, spec, prefix):
|
def configure(self, spec, prefix):
|
||||||
# NOTE: configure script is interactive. If you set the appropriate
|
# NOTE: configure script is interactive. If you set the appropriate
|
||||||
@ -592,11 +589,15 @@ def post_configure_fixes(self):
|
|||||||
'.tf_configure.bazelrc')
|
'.tf_configure.bazelrc')
|
||||||
|
|
||||||
def build(self, spec, prefix):
|
def build(self, spec, prefix):
|
||||||
|
tmp_path = env['TEST_TMPDIR']
|
||||||
|
|
||||||
# https://docs.bazel.build/versions/master/command-line-reference.html
|
# https://docs.bazel.build/versions/master/command-line-reference.html
|
||||||
args = [
|
args = [
|
||||||
# Don't allow user or system .bazelrc to override build settings
|
# Don't allow user or system .bazelrc to override build settings
|
||||||
'--nohome_rc',
|
'--nohome_rc',
|
||||||
'--nosystem_rc',
|
'--nosystem_rc',
|
||||||
|
# Bazel does not work properly on NFS, switch to /tmp
|
||||||
|
'--output_user_root=' + tmp_path,
|
||||||
'build',
|
'build',
|
||||||
# Spack logs don't handle colored output well
|
# Spack logs don't handle colored output well
|
||||||
'--color=no',
|
'--color=no',
|
||||||
@ -665,7 +666,6 @@ def build(self, spec, prefix):
|
|||||||
|
|
||||||
build_pip_package = Executable(
|
build_pip_package = Executable(
|
||||||
'bazel-bin/tensorflow/tools/pip_package/build_pip_package')
|
'bazel-bin/tensorflow/tools/pip_package/build_pip_package')
|
||||||
tmp_path = env['TEST_TMPDIR']
|
|
||||||
build_pip_package(tmp_path)
|
build_pip_package(tmp_path)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
Loading…
Reference in New Issue
Block a user