forked from pytorch/torchcodec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC: build from source for now (pytorch#133)
Summary: Pull Request resolved: pytorch#133 Reviewed By: scotts, ahmadsharif1 Differential Revision: D60521151 Pulled By: NicolasHug fbshipit-source-id: 2f36e8a649d9f9aa44eeadecbbe15f26ed4bc1eb
- Loading branch information
1 parent
699e8c6
commit 361968f
Showing
2 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,38 +81,45 @@ ffmpeg -f lavfi -i \ | |
|
||
## Installing TorchCodec | ||
|
||
Note: if you're on MacOS, you'll need to [build from source](./CONTRIBUTING.md). | ||
Instructions below assume you're on Linux. | ||
|
||
First install the latest stable version of PyTorch following the [official | ||
We'll be providing wheels in the coming days so that you can just install | ||
torchcodec using `pip`. For now, you can just build from source. You will need | ||
the following dependencies: | ||
|
||
- A C++ compiler+linker. This is typically available on a baseline Linux | ||
installation already. | ||
- cmake | ||
- pkg-config | ||
- FFmpeg | ||
- PyTorch nightly | ||
|
||
Start by installing PyTorch following the [official | ||
instructions](https://pytorch.org/get-started/locally/). | ||
|
||
Then: | ||
Then, the easiest way to install the rest of the dependencies is to run: | ||
|
||
```bash | ||
pip install torchcodec | ||
conda install cmake pkg-config ffmpeg -c conda-forge | ||
``` | ||
You will also need FFmpeg installed on your system, and TorchCodec decoding | ||
capabilities are determined by your underlying FFmpeg installation. There are | ||
different options to install FFmpeg e.g.: | ||
|
||
To clone and install the repo, run: | ||
|
||
```bash | ||
conda install ffmpeg | ||
# or | ||
conda install ffmpeg -c conda-forge | ||
git clone [email protected]:pytorch/torchcodec.git | ||
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git | ||
cd torchcodec | ||
|
||
pip install -e ".[dev]" --no-build-isolation -vv | ||
``` | ||
|
||
Your Linux distribution probably comes with FFmpeg pre-installed as well. | ||
TorchCodec supports all major FFmpeg version in [4, 7]. | ||
|
||
|
||
## Planned future work | ||
|
||
We are actively working on the following features: | ||
|
||
- Ship wheels for Linux, so that Linux users can `pip install torchcodec`. | ||
- [Ship wheels for MacOS](https://github.com/pytorch/torchcodec/issues/111), so | ||
that MacOS users can `pip install torchcodec`. For now this is only supported | ||
on Linux, but MacOS users can [build from source](./CONTRIBUTING.md). | ||
that MacOS users can `pip install torchcodec`. | ||
- [GPU decoding](https://github.com/pytorch/torchcodec/pull/58) | ||
- [Audio decoding](https://github.com/pytorch/torchcodec/issues/85) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
Installation Instructions | ||
========================= | ||
|
||
.. note:: | ||
TorchCodec is only available on Linux for now. We plan to support other | ||
platforms in the future. | ||
We'll be providing wheels in the coming days so that you can just install | ||
torchcodec using ``pip``. For now, you can just build from source. You will need | ||
the following dependencies: | ||
|
||
Installing torchcodec should be as simple as: | ||
- A C++ compiler+linker. This is typically available on a baseline Linux | ||
installation already. | ||
- cmake | ||
- pkg-config | ||
- FFmpeg | ||
- PyTorch nightly | ||
|
||
.. code:: bash | ||
Start by installing PyTorch following the `official instructions | ||
<https://pytorch.org/get-started/locally/>`_. | ||
|
||
pip install torchcodec | ||
Then, the easiest way to install the rest of the dependencies is to run: | ||
|
||
You will need a working PyTorch installation, which you can install following | ||
the `official instructions <https://pytorch.org/get-started/locally/>`_. | ||
conda install cmake pkg-config ffmpeg -c conda-forge | ||
|
||
You will also need FFmpeg installed on your system, and TorchCodec decoding | ||
capabilities are determined by your underlying FFmpeg installation. There are | ||
different options to install FFmpeg e.g.: | ||
To clone and install the repo, run: | ||
|
||
.. code:: bash | ||
git clone [email protected]:pytorch/torchcodec.git | ||
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git | ||
cd torchcodec | ||
|
||
conda install ffmpeg | ||
# or | ||
conda install ffmpeg -c conda-forge | ||
pip install -e ".[dev]" --no-build-isolation -vv | ||
|
||
Your Linux distribution probably comes with FFmpeg pre-installed as well. | ||
TorchCodec supports all major FFmpeg version in [4, 7]. | ||
|
||
Note that installation instructions may slightly change over time. The most | ||
up-to-date instructions should be available from the `README | ||
<https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec>`_. |