This requires Python, Bazel and Git. (And TensorFlow for testing the package.)
Install virtualenv if it's not installed already:
~$ sudo apt-get install python-virtualenv
Create a virtual environment for the package creation:
~$ virtualenv --system-site-packages adanet_env
And activate it:
~$ source ~/adanet_env/bin/activate # bash, sh, ksh, or zsh
~$ source ~/adanet_env/bin/activate.csh # csh or tcsh
(adanet_env)~$ git clone https://github.com/tensorflow/adanet && cd adanet
To build a pip package for adanet:
(adanet_env)~/adanet$ bazel build //adanet/pip_package:build_pip_package
(adanet_env)~/adanet$ bazel-bin/adanet/pip_package/build_pip_package /tmp/adanet_pkg
Run the following command to install the pip package:
(adanet_env)~/adanet$ pip install /tmp/adanet_pkg/*.whl
Finally try importing adanet
in Python outside the cloned directory:
(adanet_env)~/adanet$ cd ~
(adanet_env)~$ python -c "import adanet"
(adanet_env)~/$ deactivate