You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Updated to Anaconda Python 3.7 distribution
- Added installation information for Linux systems.
- Updated tutorial to point latest Tensorflow models version (used since v2.1)
- To ensure that we have no package conflicts and/or that we can install several different versions/variants of TensorFlow (e.g. CPU and GPU), it is generally recommended to use a virtual environment of some sort. For the purposes of this tutorial we will be creating and managing our virtual environments using Anaconda, but you are welcome to use the virtual environment manager of your choice (e.g. virtualenv).
12
12
13
-
Install Anaconda Python 3.6 (Optional)
13
+
Install Anaconda Python 3.7 (Optional)
14
14
--------------------------------------
15
15
Although having Anaconda is not a requirement in order to install and use TensorFlow, I suggest doing so, due to it's intuitive way of managing packages and setting up new virtual environments. Anaconda is a pretty useful tool, not only for working with TensorFlow, but in general for anyone working in Python, so if you haven't had a chance to work with it, now is a good chance.
16
16
17
-
- Go to `<https://www.anaconda.com/download/>`_
18
-
- Download Anaconda Python 3.6 version
19
-
- If disk space is an issue for your machine, you could install the minified version of Anaconda (i.e. Miniconda).
20
-
- When prompted for a "Destination Folder" you can chose whichever you wish, but I generally tend to use ``C:\Anaconda3``, to keep things simple. Putting Anaconda under ``C:\Anaconda3`` also ensures that you don't get the awkward ```Destination Folder` contains spaces`` warning.
17
+
.. tabs::
18
+
19
+
.. tab:: Windows
20
+
21
+
- Go to `<https://www.anaconda.com/download/>`_
22
+
- Download `Anaconda Python 3.7 version for Windows <https://repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86_64.exe>`_
23
+
- Run the downloaded executable (``.exe``) file to begin the installation. See `here <https://docs.anaconda.com/anaconda/install/windows/>`_ for more details.
24
+
- (Optional) In the next step, check the box "Add Anaconda to my PATH environment variable". This will make Anaconda your default Python distribution, which should ensure that you have the same default Python distribution across all editors.
25
+
26
+
.. tab:: Linux
27
+
28
+
- Go to `<https://www.anaconda.com/download/>`_
29
+
- Download `Anaconda Python 3.7 version for Linux <https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh>`_
30
+
- Run the downloaded bash script (``.sh``) file to begin the installation. See `here <https://docs.anaconda.com/anaconda/install/linux/>`_ for more details.
31
+
- When prompted with the question "Do you wish the installer to prepend the Anaconda<2 or 3> install location to PATH in your /home/<user>/.bashrc ?", answer "Yes". If you enter "No", you must manually add the path to Anaconda or conda will not work.
21
32
22
33
.. _tf_install:
23
34
@@ -123,47 +134,80 @@ Before proceeding to install TesnsorFlow GPU, you need to make sure that your sy
123
134
+-------------------------------------+
124
135
| CuDNN v7.0.5 |
125
136
+-------------------------------------+
126
-
| Anaconda with Python 3.6 (Optional) |
137
+
| Anaconda with Python 3.7 (Optional) |
127
138
+-------------------------------------+
128
139
129
140
.. _cuda_install:
130
141
131
142
Install CUDA Toolkit
132
143
***********************
133
-
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork>`_ to download and install CUDA Toolkit v9.0.
144
+
.. tabs::
145
+
146
+
.. tab:: Windows
147
+
148
+
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork>`_ to download and install CUDA Toolkit v9.0.
149
+
150
+
.. tab:: Linux
151
+
152
+
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64>`_ to download and install CUDA Toolkit v9.0 for your Linux distribution.
134
153
135
154
.. _cudnn_install:
136
155
137
156
Install CUDNN
138
157
****************
139
-
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
140
-
- Create a user profile if needed and log in
141
-
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
142
-
- Download `cuDNN v7.0.5 Library for Windows 10 <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7>`_
143
-
- Extract the contents of the zip file (i.e. the folder named ``cuda``) inside ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\``, where ``<INSTALL_PATH>`` points to the installation directory specified during the installation of the CUDA Toolkit. By default ``<INSTALL_PATH>`` = ``C:\Program Files``.
158
+
.. tabs::
159
+
160
+
.. tab:: Windows
161
+
162
+
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
163
+
- Create a user profile if needed and log in
164
+
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
165
+
- Download `cuDNN v7.0.5 Library for Windows 10 <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7>`_
166
+
- Extract the contents of the zip file (i.e. the folder named ``cuda``) inside ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\``, where ``<INSTALL_PATH>`` points to the installation directory specified during the installation of the CUDA Toolkit. By default ``<INSTALL_PATH>`` = ``C:\Program Files``.
167
+
168
+
.. tab:: Linux
169
+
170
+
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
171
+
- Create a user profile if needed and log in
172
+
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
173
+
- Download `cuDNN v7.0.5 Library for Linux <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-linux-x64-v7>`_
174
+
- Follow the instructions under Section 2.3.1 of the `CuDNN Installation Guide <https://developer.download.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/Doc/cuDNN-Installation-Guide.pdf?KuMH0SWQKOxRm-iCAdfWlxEMK7eWjI528XHuZvaXjt73sOFgHT0dczMVRMRx8NqSNxabcGwzsgBgdTeshiZqQ7QmMQ3DwdTQHbjJGu04-Dw1F4Eyvd8B9u_U5YkSthOTFCASAp-MWj6Ki9RIK209dftWXhk7Df33u2__kbsKa5L9a0BXvRfTjZ-LZzH3zQpydg>`_ to install CuDNN.
144
175
145
176
.. _set_env:
146
177
147
-
Set Your Environment Variables
148
-
**********************************
178
+
Environment Setup
179
+
*****************
180
+
.. tabs::
149
181
150
-
- Go to `Start` and Search "environment variables"
151
-
- Click the Environment Variables button
152
-
- Click on the ``Path`` system variable and select edit
As per Section 7.1.1 of the `CUDA Installation Guide for Linux <http://developer.download.nvidia.com/compute/cuda/9.0/Prod/docs/sidebar/CUDA_Installation_Guide_Linux.pdf>`_, append the following lines to ``~/.bashrc``:
If during the installation of the CUDA Toolkit (see :ref:`cuda_install`) you selected the `Express Installation` option, then your GPU drivers will have been overwritten by those that come bundled with the CUDA toolkit. These drivers are typically NOT the latest drivers and, thus, you may wish to updte your drivers.
163
207
164
208
- Go to `<http://www.nvidia.com/Download/index.aspx>`_
165
209
- Select your GPU version to download
166
-
- Install the driver
210
+
- Install the driver for your chosen OS
167
211
168
212
Create a new Conda virtual environment
169
213
**************************************
@@ -259,15 +303,15 @@ Building on the assumption that you have just created your new virtual environme
259
303
+--------------+------------------------------+
260
304
| Name | Tutorial version-build |
261
305
+==============+==============================+
262
-
| pillow | 5.0.0-py36h0738816_0|
306
+
| pillow | 5.4.1-py36hdc69c19_0|
263
307
+--------------+------------------------------+
264
-
| lxml | 4.2.0-py36heafd4d3_0|
308
+
| lxml | 4.3.1-py36h1350720_0|
265
309
+--------------+------------------------------+
266
-
| jupyter | 1.0.0-py36_4|
310
+
| jupyter | 1.0.0-py36_7|
267
311
+--------------+------------------------------+
268
-
| matplotlib |2.2.2-py36h153e9ff_0|
312
+
| matplotlib |3.0.2-py36hc8f65d3_0|
269
313
+--------------+------------------------------+
270
-
| opencv | 3.3.1-py36h20b85fd_1|
314
+
| opencv | 3.4.2-py36h40b0b35_0|
271
315
+--------------+------------------------------+
272
316
273
317
The packages can be installed using ``conda`` by running:
@@ -307,7 +351,7 @@ Downloading the TensorFlow Models
307
351
├── samples
308
352
└── tutorials
309
353
310
-
.. [#] The latest repo commit when writing this tutorial is `da903e0<https://github.com/tensorflow/models/commit/da903e07aea0887d59ebf612557243351ddfb4e6>`_.
354
+
.. [#] The latest repo commit when writing this tutorial is `4b566d4<https://github.com/tensorflow/models/commit/4b566d4e800ff82579eda1f682f9ce7aa8792ea8>`_.
311
355
312
356
Protobuf Installation/Compilation
313
357
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -483,10 +527,20 @@ To deal with the fact that ``labelImg`` (on Windows) requires the use of ``pyqt4
483
527
484
528
* Open a new `Anaconda/Command Prompt` window
485
529
* Type the following command:
530
+
531
+
.. tabs::
486
532
487
-
.. code-block:: bash
533
+
.. tab:: Windows
488
534
489
-
conda create -n labelImg pyqt=4
535
+
.. code-block:: bash
536
+
537
+
conda create -n labelImg pyqt=4
538
+
539
+
.. tab:: Linux
540
+
541
+
.. code-block:: bash
542
+
543
+
conda create -n labelImg pyqt=5
490
544
491
545
* The above will create a new virtual environment with name ``labelImg``
492
546
* Now lets activate the newly created virtual environment by running the following in the `Anaconda Promt` window:
@@ -527,11 +581,23 @@ Installing dependencies and compiling package
527
581
- Open a new `Anaconda/Command Prompt` window and activate the `tensorflow_gpu` environment (if you have not done so already)
528
582
- ``cd`` into ``TensorFlow\addons\labelImg`` and run the following commands:
<tr><tdclass="label"><aclass="fn-backref" href="#id1">[*]</a></td><td>Even though this tutorial is based on Windows 10, most steps (excluding the setting of environmental variables) should apply for Linux, too.</td></tr>
190
+
<tr><tdclass="label"><aclass="fn-backref" href="#id1">[*]</a></td><td>Even though this tutorial is mostly based (and properly tested) on Windows 10, information is also provided for Linux systems.</td></tr>
<liclass="toctree-l4"><aclass="reference internal" href="install.html#create-a-new-conda-virtual-environment-optional">Create a new Conda virtual environment (Optional)</a></li>
<liclass="toctree-l4"><aclass="reference internal" href="install.html#update-your-gpu-drivers-optional">Update your GPU drivers (Optional)</a></li>
211
211
<liclass="toctree-l4"><aclass="reference internal" href="install.html#create-a-new-conda-virtual-environment">Create a new Conda virtual environment</a></li>
212
212
<liclass="toctree-l4"><aclass="reference internal" href="install.html#install-tensorflow-gpu-for-python">Install TensorFlow GPU for Python</a></li>
213
-
<liclass="toctree-l4"><aclass="reference internal" href="install.html#id4">Test your Installation</a></li>
213
+
<liclass="toctree-l4"><aclass="reference internal" href="install.html#id10">Test your Installation</a></li>
0 commit comments