Skip to content

Commit

Permalink
feat: add optional conda/pip support (#119)
Browse files Browse the repository at this point in the history
* Adding optional conda/pip support

* Removing comments

* Adding clearer options for dependency installation
  • Loading branch information
lucapericlp authored Apr 2, 2024
1 parent 01e3bc0 commit 0345ea8
Show file tree
Hide file tree
Showing 6 changed files with 2,690 additions and 256 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/python-poetry/poetry
rev: "1.8"
hooks:
- id: poetry-lock
- id: poetry-export
args: ["--dev", "-f", "requirements.txt", "-o", "requirements.txt"]
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ rm -rf ffmpeg-git-*

# install rust if not installed (ensure you've restarted your terminal after installation)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

### Project dependencies installation
1. [Using poetry](#using-poetry-recommended)
2. [Using pip/conda](#using-pipconda)

#### Using poetry (recommended)
```bash
# install poetry if not installed (ensure you've restarted your terminal after installation)
pipx install poetry

Expand All @@ -66,6 +74,16 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring
poetry install && poetry run pip install torch==2.2.1 torchaudio==2.2.1
```

#### Using pip/conda
NOTE 1: When raising issues, we'll ask you to try with poetry first.
NOTE 2: All commands in this README use `poetry` by default, so you can just remove any `poetry run`.

```bash
pip install -r requirements.txt
pip install torch==2.2.1 torchaudio==2.2.1
pip install -e .
```

## Usage
1. Download it and use it anywhere (including locally) with our [reference implementation](/fam/llm/fast_inference.py)
```bash
Expand Down
Loading

0 comments on commit 0345ea8

Please sign in to comment.