installation_instructions.rst 1.16 KB
Newer Older
1
2
3
Installing FairScale
====================

4
Installing FairScale is extremely simple with pre-built binaries (pip) that we provide. You can also build
anj-s's avatar
anj-s committed
5
6
from source using the instructions below.

7
8
9

Requirements
~~~~~~~~~~~~
anj-s's avatar
anj-s committed
10

11
* PyTorch>= 1.8.1
anj-s's avatar
anj-s committed
12

13
14
15

Installing the pip package (stable)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17
18
19

.. code-block:: bash

	pip install fairscale
20

21

22
23
24
25
26
27
28
29
30
31
32
33
34
Installing with conda
~~~~~~~~~~~~~~~~~~~~~

Fairscale is packaged by conda-forge (see `here <https://github.com/conda-forge/fairscale-feedstock>`_)
for both linux & osx, with GPU-enabled builds available on linux.

.. code-block:: bash

	conda install -c conda-forge fairscale


Installing from source
~~~~~~~~~~~~~~~~~~~~~~
35
36

.. code-block:: bash
37

anj-s's avatar
anj-s committed
38
    git clone https://github.com/facebookresearch/fairscale.git
39
40
    cd fairscale
    pip install -r requirements.txt
anj-s's avatar
anj-s committed
41
    # -e signified dev mode since e stands for editable
42
43
    pip install -e .

44
45
To build with GPU-support enabled, be sure to set ``BUILD_CUDA_EXTENSIONS=1``
as well as an appropriate ``TORCH_CUDA_ARCH_LIST``.
anj-s's avatar
anj-s committed
46

47
48
Note: If either of the above fails, add ``--no-build-isolation`` to the ``pip install``
command (this could be a problem with recent versions of pip).