-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ML-Agents for Windows Instructions #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated windows local test. Added instructions for installing Nvidia CUDA
Added instructions for downloading Nvidia cuDNN
docs/Installation-Windows.md
Outdated
| @@ -0,0 +1,168 @@ | |||
| # Installing ML-Agents for Windows | |||
| In order to get ML-Agents working with Windows, you will need to have Windows 10 installed. While it is possible for ML-Agents to work on other versions of Windows, we have only tested with a local installation of Windows 10 (not using VM like Bootcamp or Parallels). | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Page-wide feedback:
- Add an empty line after headers
- You use double spaces to separate sentences (?)
Line-specific feedback:
- "not using VM" --> "not using a VM"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering why we are telling people to use GPU for training specially for Windows users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can have two sub-sections, one for CPU usage (greatly simplified) and the other for GPU usage? It would reduce the number of issues windows-using hobbyists run into by a lot.
docs/Installation-Windows.md
Outdated
| width="500" border="10" /> | ||
| </p> | ||
|
|
||
| Copy these three folders into the CUDA toolkit directory. In this guide, the CUDA toolkit directory is located at `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In this guide, the CUDA ..." is repeated from above.
docs/Installation-Windows.md
Outdated
| ## Step 1: Install Nvidia CUDA toolkit | ||
| <a href="https://developer.nvidia.com/cuda-toolkit-archive" target="_blank">Download</a> and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library and is needed to run ML-Agents. You can select the latest or previous releases. In this guide, we are using version 9.1.85.3 ([direct link](https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/3/cuda_9.1.85.3_windows)). | ||
|
|
||
| _Before installing, please make sure you __close any running instances of Unity or Visual Studio.___ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixing italics and bold seems odd to me.
docs/Installation-Windows.md
Outdated
| width="500" border="10" /> | ||
| </p> | ||
|
|
||
| To set the two path variables, inside the same __Enviornment Variables__ window and under the second box called __System Variables__, find a variable called `PATH` and click __Edit__. You will add two directories to the list. For this guide, the two entries would look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space in "add two"
docs/Installation-Windows.md
Outdated
| </p> | ||
|
|
||
| ## Step 4: Install Python via Anaconda | ||
| <a href="https://www.anaconda.com/download/#windows" target="_blank">Download</a> and install Anaconda for Windows. By using Anaconda, you can use manage separate environments for different distributions of Python. We **strongly** recommend using Python 3 as we do not guarantee supporting Python 2 in future releases. In this guide, we are using Python version 3.6 and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that _blank isn't impacting markdown. I use this: https://github.com/joeyespo/grip
docs/Installation-Windows.md
Outdated
|
|
||
| After this, you will need to install `tensorflow` and `tensorflow-gpu`. This can be installed by using `pip` - which is a package management system used to install Python packages. In the same Anaconda Prompt, type in the following command _(make sure you are connected to the internet)_: | ||
|
|
||
| pip install tensorflow tensorflow-gpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ``` markdown for code
docs/Installation-Windows.md
Outdated
|
|
||
| Lastly, you should test to see if everything installed properly. You can do this to see if TensorFlow can identify your GPU. In the same Anaconda Prompt, type in the following command: | ||
|
|
||
| python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ``` markdown for code
docs/Installation-Windows.md
Outdated
|
|
||
| If you haven't already, make sure to clone the repository. You can do this using Git ([download here](https://git-scm.com/download/win)) and running the following commands in a new or same Anaconda Prompt (_if you closed the prompt from Step 5, you can activate the ml-agents Conda environment by typing `activate ml-agents`_): | ||
|
|
||
| git clone git@github.com:Unity-Technologies/ml-agents.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ``` markdown for code
docs/Installation-Windows.md
Outdated
|
|
||
| In our example, the files are located in `C:\Downloads`. After you have either cloned or downloaded the files, from the Anaconda Prompt, change to the python directory inside the ML-agents directory: | ||
|
|
||
| cd C:\Downloads\ml-agents\python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ``` markdown for code
docs/Installation-Windows.md
Outdated
|
|
||
| Make sure you are connected to the internet and then type in the Anaconda Prompt: | ||
|
|
||
| pip install . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ``` markdown for code
|
@mmattar @awjuliani @jo3w4rd @xiaomaogy all changes updated. |
docs/Installation-Windows.md
Outdated
|
|
||
| ## Step 1: Install Python via Anaconda | ||
|
|
||
| <a href="https://www.anaconda.com/download/#windows" target="_blank">Download</a> and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. We **strongly** recommend using Python 3 as we do not guarantee supporting Python 2 in future releases. In this guide, we are using Python version 3.6 and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this to say we require Python 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/Installation-Windows.md
Outdated
| @@ -0,0 +1,190 @@ | |||
| # Installing ML-Agents for Windows | |||
|
|
|||
| ML-Agents supports Windows 10. While it might be possible to run ML-Agents using other versions of Windows, we only test Windows 10. (We also do not test running Windows on a VM like Bootcamp or Parallels). | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"we only test Windows 10" --> "it has not been tested on other versions"
"(We also do not test running Windows on a VM like Bootcamp or Parallels)." --> "Furthermore, ML-Agents has not been tested on a Windows VM such as Bootcamp or Parallels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| ## (Optional) Step 1: Install Nvidia CUDA toolkit | ||
|
|
||
| <a href="https://developer.nvidia.com/cuda-toolkit-archive" target="_blank">Download</a> and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library and is needed to run ML-Agents. You can select the latest or previous releases. In this guide, we are using version 9.1.85.3 ([direct link](https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/3/cuda_9.1.85.3_windows)). | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ML-Agents does not work with CUDA 9 because it requires tensorflow 1.5 which is not supported in the internal brain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/Installation-Windows.md
Outdated
| Next, install `tensorflow` and `tensorflow-gpu`. Install these packages using `pip` - which is a package management system used to install Python packages. In the same Anaconda Prompt, type in the following command _(make sure you are connected to the internet)_: | ||
|
|
||
| ``` | ||
| pip install tensorflow tensorflow-gpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using only CPU, then they should use tensorflow if installing cuda, etc, then use tensorflow-gpu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Added screenshots into docs/images. Updated pointer from installation.md to new guide installation-windows.md