Also the following related changes: * Removed Python 2 support because it's not supported by TF and related packages for a long time. * Upgraded tensorboard and estimator packages to the required versions. * Added extra plugins for tensorboard to support profiling. * In the previous derivation versions, TF_SYSTEM_LIBS didn't have any effect because it was reset at repo fetching stage, so TF always used its own dependencies. Made TF_SYSTEM_LIBS actually work and fixed the errors caused by enabling it. * Enabled tensorboard by default (but still keeping an option to disable it if needed).
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ lib, fetchPypi, buildPythonPackage, isPy3k
 | 
						|
, numpy
 | 
						|
, wheel
 | 
						|
, werkzeug
 | 
						|
, protobuf
 | 
						|
, grpcio
 | 
						|
, markdown
 | 
						|
, absl-py
 | 
						|
, google-auth-oauthlib
 | 
						|
, tensorboard-plugin-wit
 | 
						|
, tensorboard-plugin-profile
 | 
						|
}:
 | 
						|
 | 
						|
# tensorflow/tensorboard is built from a downloaded wheel, because
 | 
						|
# https://github.com/tensorflow/tensorboard/issues/719 blocks
 | 
						|
# buildBazelPackage.
 | 
						|
 | 
						|
buildPythonPackage rec {
 | 
						|
  pname = "tensorflow-tensorboard";
 | 
						|
  version = "2.4.0";
 | 
						|
  format = "wheel";
 | 
						|
  disabled = !isPy3k;
 | 
						|
 | 
						|
  src = fetchPypi {
 | 
						|
    pname = "tensorboard";
 | 
						|
    inherit version format;
 | 
						|
    python = "py3";
 | 
						|
    sha256 = "0f17h6i398n8maam0r3rssqvdqnqbwjyf96nnhf482anm1iwdq6d";
 | 
						|
  };
 | 
						|
 | 
						|
  propagatedBuildInputs = [
 | 
						|
    numpy
 | 
						|
    werkzeug
 | 
						|
    protobuf
 | 
						|
    markdown
 | 
						|
    grpcio
 | 
						|
    absl-py
 | 
						|
    google-auth-oauthlib
 | 
						|
    tensorboard-plugin-profile
 | 
						|
    tensorboard-plugin-wit
 | 
						|
    # not declared in install_requires, but used at runtime
 | 
						|
    # https://github.com/NixOS/nixpkgs/issues/73840
 | 
						|
    wheel
 | 
						|
  ];
 | 
						|
 | 
						|
  # in the absence of a real test suite, run cli and imports
 | 
						|
  checkPhase = ''
 | 
						|
    $out/bin/tensorboard --help > /dev/null
 | 
						|
  '';
 | 
						|
 | 
						|
  pythonImportsCheck = [
 | 
						|
    "tensorboard"
 | 
						|
    "tensorboard.backend"
 | 
						|
    "tensorboard.compat"
 | 
						|
    "tensorboard.data"
 | 
						|
    "tensorboard.plugins"
 | 
						|
    "tensorboard.summary"
 | 
						|
    "tensorboard.util"
 | 
						|
  ];
 | 
						|
 | 
						|
  meta = with lib; {
 | 
						|
    description = "TensorFlow's Visualization Toolkit";
 | 
						|
    homepage = "http://tensorflow.org";
 | 
						|
    license = licenses.asl20;
 | 
						|
    maintainers = with maintainers; [ abbradar ];
 | 
						|
  };
 | 
						|
}
 |