From 17ac7383d0b79fe178262555f61a5c88861269b2 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 31 Jul 2024 16:18:01 +0100 Subject: [PATCH 1/3] DOC: build from source for now --- README.md | 39 ++++++++++++++++------------ docs/source/install_instructions.rst | 38 +++++++++++++-------------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 18e2ec68e..1aadce457 100644 --- a/README.md +++ b/README.md @@ -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. +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: -First install the latest stable version of PyTorch following the [official -instructions](https://pytorch.org/get-started/locally/). +- A C++ compiler+linker. This is typically available on a baseline Linux + installation already. +- cmake +- pkg-config +- FFmpeg +- PyTorch nightly -Then: +Start by installing the **nightly** build of PyTorch following the +[official instructions](https://pytorch.org/get-started/locally/). + +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 git@github.com: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) diff --git a/docs/source/install_instructions.rst b/docs/source/install_instructions.rst index 41919be98..8bc720387 100644 --- a/docs/source/install_instructions.rst +++ b/docs/source/install_instructions.rst @@ -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 the **nightly** build of PyTorch following the +`official instructions _. - 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 `_. + 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 git@github.com: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 -`_. From 1e9b6b4e5915aa8d9e7a8d9558f1b1c330440cb9 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 31 Jul 2024 16:25:08 +0100 Subject: [PATCH 2/3] fix --- docs/source/install_instructions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/install_instructions.rst b/docs/source/install_instructions.rst index 8bc720387..631ab7728 100644 --- a/docs/source/install_instructions.rst +++ b/docs/source/install_instructions.rst @@ -12,8 +12,8 @@ the following dependencies: - FFmpeg - PyTorch nightly -Start by installing the **nightly** build of PyTorch following the -`official instructions _. +Start by installing the **nightly** build of PyTorch following the `official +instructions `_. Then, the easiest way to install the rest of the dependencies is to run: From 6b64f5c13e979b8efd6bece49d54fe294edc8675 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 31 Jul 2024 16:26:29 +0100 Subject: [PATCH 3/3] fix --- README.md | 4 ++-- docs/source/install_instructions.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1aadce457..0158e9131 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,8 @@ the following dependencies: - FFmpeg - PyTorch nightly -Start by installing the **nightly** build of PyTorch following the -[official instructions](https://pytorch.org/get-started/locally/). +Start by installing PyTorch following the [official +instructions](https://pytorch.org/get-started/locally/). Then, the easiest way to install the rest of the dependencies is to run: diff --git a/docs/source/install_instructions.rst b/docs/source/install_instructions.rst index 631ab7728..b6b748eb1 100644 --- a/docs/source/install_instructions.rst +++ b/docs/source/install_instructions.rst @@ -12,8 +12,8 @@ the following dependencies: - FFmpeg - PyTorch nightly -Start by installing the **nightly** build of PyTorch following the `official -instructions `_. +Start by installing PyTorch following the `official instructions +`_. Then, the easiest way to install the rest of the dependencies is to run: