Skip to content

Commit c89687d

Browse files
fcardoso75ijrsvt
andauthored
Build instructions for Windows (ray-project#15422)
* Added build instructions for Windows * Fixed minor indentantion issue * Addressing code review comments * Fixed minor indentation issues * Fixed minor punctuation issue * Added bazel to requirements list * Fixed git download link. Co-authored-by: Ian Rodney <[email protected]> * Added explanation for need to enable Developer Mode * Moving Fast, Debug, and Optimized Builds one level up * Added pytest to Windows requirements. Removed old dangling Windows text from Linux build instructions Co-authored-by: Ian Rodney <[email protected]>
1 parent f562855 commit c89687d

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

doc/source/development.rst

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Running the script will remove the ``ray/tune``, ``ray/rllib``, ``ray/autoscale
4646
# This replaces miniconda3/lib/python3.7/site-packages/ray/tune
4747
# with your local `ray/python/ray/tune`.
4848
49-
Building Ray (full)
50-
-------------------
49+
Building Ray on Linux (full)
50+
----------------------------
5151

5252
.. tip:: If you are only editing Tune/RLlib/Autoscaler files, follow instructions for :ref:`python-develop` to avoid long build times.
5353

@@ -71,8 +71,6 @@ For MacOS, run the following commands:
7171
7272
pip install cython==0.29.0 pytest
7373
74-
For Windows, see the :ref:`Windows Dependencies <windows-dependencies>` section.
75-
7674
Ray can be built from the repository as follows.
7775

7876
.. code-block:: bash
@@ -99,9 +97,53 @@ directory will take effect without reinstalling the package.
9997

10098
.. warning:: if you run ``python setup.py install``, files will be copied from the Ray directory to a directory of Python packages (``/lib/python3.6/site-packages/ray``). This means that changes you make to files in the Ray directory will not have any effect.
10199

100+
Building Ray on Windows (full)
101+
------------------------------
102+
103+
**Requirements**
104+
105+
The following links were correct during the writing of this section. In case the URLs changed, search at the organizations' sites.
106+
107+
- bazel 3.2
108+
- Microsoft Visual Studio 2019 (or Microsoft Build Tools 2019 - https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019)
109+
- JDK 15 (https://www.oracle.com/java/technologies/javase-jdk15-downloads.html)
110+
- Miniconda 3 (https://docs.conda.io/en/latest/miniconda.html)
111+
- git for Windows, version 2.31.1 or later (https://git-scm.com/download/win)
112+
113+
**Steps**
114+
115+
1. Enable Developer mode on Windows 10 systems. This is necessary so git can create symlinks.
116+
117+
1. Open Settings app;
118+
2. Go to "Update & Security";
119+
3. Go to "For Developers" on the left pane;
120+
4. Turn on "Developer mode".
121+
122+
2. Add the following Miniconda subdirectories to PATH. If Miniconda was installed for all users, the following paths are correct. If Miniconda is installed for a single user, adjust the paths accordingly.
123+
124+
- ``C:\ProgramData\Miniconda3``
125+
- ``C:\ProgramData\Miniconda3\Scripts``
126+
- ``C:\ProgramData\Miniconda3\Library\bin``
127+
128+
3. Define an environment variable BAZEL_SH to point to bash.exe. If git for Windows was installed for all users, bash's path should be ``C:\Program Files\Git\bin\bash.exe``. If git was installed for a single user, adjust the path accordingly.
129+
130+
4. Install cython and pytest:
131+
132+
.. code-block:: shell
133+
134+
pip install cython==0.29.0 pytest
135+
136+
5. Download ray source code and build it.
137+
138+
.. code-block:: shell
139+
140+
# cd to the directory under which the ray source tree will be downloaded.
141+
git clone -c core.symlinks=true https://github.com/ray-project/ray.git
142+
cd ray\python
143+
pip install -e . --verbose
102144
103145
Fast, Debug, and Optimized Builds
104-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146+
---------------------------------
105147

106148
Currently, Ray is built with optimizations, which can take a long time and
107149
interfere with debugging. To perform fast, debug, or optimized builds, you can

0 commit comments

Comments
 (0)