Skip to content
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

update README.md for dev packages #471

Merged
merged 3 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@ For recent changes, you can have a look at the [changelog](CHANGELOG.md)

### Installation

To install xFormers, it is recommended to use a dedicated virtual environment, as often with python, through `python-virtualenv` or `conda` for instance. A preset conda environment is provided for convenience, you can use it as follows:
To install xFormers, it is recommended to use a dedicated virtual environment, as often with python, through `python-virtualenv` or `conda` for instance.
PyTorch must be installed. Using conda for example:

```bash
conda env create --file=environment_conda.yaml
conda create --name xformers python=3.10
conda activate xformers
conda install -c pytorch -c conda-forge cudatoolkit=11.6 pytorch=1.12.1
```

*Please note that Pytorch 1.12 or newer is required. You can fetch it using `pip` or `conda` [here](https://pytorch.org/get-started/locally/)*
*Please note that Pytorch 1.12 or newer is required.

There are two ways you can install xFormers locally:

<details><summary> Directly from the pip package </summary><p>
<details><summary> Conda dev packages </summary><p>

You can fetch the latest release from PyPi. This will not contain the wheels for the sparse attention kernels, for which you will need to build from source.
There are regular builds of xformers as it is developed on the `main` branch.
To use these, you must be on Linux and have a conda environment with Python 3.9 or 3.10, CUDA 11.3 or 11.6, and PyTorch 1.12.1.
You can install the latest with

```bash
pip install xformers
conda install xformers -c xformers/label/dev
```

</p></details>
Expand Down
1 change: 1 addition & 0 deletions packaging/conda/xformers/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ requirements:

run:
# - numpy >=1.11
- python
- pytorch=={{ environ.get('PYTORCH_VERSION') }}
- cudatoolkit{{ environ['CONDA_CUDATOOLKIT_CONSTRAINT'] }}

Expand Down