8000 Add instructions to set up development without reinstallation (fixes … · CJavaScala/tensorflow@d45ed5c · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-99b04cc350b5.js" defer="defer">

Commit d45ed5c

Browse files
martinwickeVijay Vasudevan
authored andcommitted
Add instructions to set up development without reinstallation (fixes tensorflow#413)
Change: 112120905
1 parent 916776a commit d45ed5c

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

tensorflow/g3doc/get_started/os_setup.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tens
8080

8181
You can now [test your installation](#test-the-tensorflow-installation).
8282

83-
## Virtualenv installation
83+
## Virtualenv installation
8484

8585
[Virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/) is a tool
8686
to keep the dependencies required by different Python projects in separate
@@ -170,7 +170,7 @@ $ source ~/tensorflow/bin/activate.csh # If using csh.
170170
(tensorflow)$ deactivate
171171
```
172172

173-
## Docker installation
173+
## Docker installation
174174

175175
[Docker](http://docker.com/) is a system to build self contained versions of a
176176
Linux operating system running on your machine. When you install and run
@@ -290,7 +290,7 @@ $ python /usr/local/lib/python2.7/dist-packages/tensorflow/models/image/mnist/co
290290
...
291291
```
292292

293-
## Installing from sources
293+
## Installing from sources
294294

295295
When installing from source you will build a pip wheel that you then install
296296
using pip. You'll need pip for that, so install it as described
@@ -491,7 +491,7 @@ best install that too:
491491
$ sudo easy_install ipython
492492
```
493493

494-
#### Configure the installation
494+
#### Configure the installation
495495

496496
Run the `configure` script at the root of the tree. The configure script
497497
asks you for the path to your python interpreter.
@@ -504,7 +504,7 @@ Please specify the location of python. [Default is /usr/bin/python]:
504504
Do you wish to build TensorFlow with GPU support? [y/N]
505505
```
506506

507-
### Create the pip package and install
507+
### Create the pip package and install
508508

509509
```bash
510510
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
@@ -546,7 +546,30 @@ Validation error: 7.0%
546546
...
547547
```
548548

549-
## Common Problems
549+
## Setting up TensorFlow for Development
550+
551+
If you're working on TensorFlow itself, it is useful to be able to test your
552+
changes in an interactive python shell without having to reinstall TensorFlow.
553+
554+
To set up TensorFlow such that all files are linked (instead of copied) from the
555+
system directories, run the following commands inside the TensorFlow root
556+
directory:
557+
558+
```bash
559+
bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
560+
mkdir _python_build
561+
cd _python_build
562+
ln -s ../bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/* .
563+
ln -s ../tensorflow/tools/pip_package/* .
564+
python setup.py develop
565+
```
566+
567+
Note that this setup still requires you to rebuild the
568+
`//tensorflow/tools/pip_package:build_pip_package` target every time you change
569+
a C++ file; add, delete, or move any python file; or if you change bazel build
570+
rules.
571+
572+
## Common Problems
550573

551574
### GPU-related issues
552575

0 commit comments

Comments
 (0)
0