From eb04b667582612b242ff69d8699a640b4a6da91b Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 1 Aug 2024 14:00:17 +0100 Subject: [PATCH] Revert "DOC: build from source for now (#133)" This reverts commit 361968f2468ce186df562621bd56e51da5fdbdb6. --- README.md | 39 ++++++++++++---------------- docs/source/install_instructions.rst | 38 ++++++++++++++------------- 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 0158e9131..18e2ec68e 100644 --- a/README.md +++ b/README.md @@ -81,45 +81,38 @@ ffmpeg -f lavfi -i \ ## Installing TorchCodec -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 +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 instructions](https://pytorch.org/get-started/locally/). -Then, the easiest way to install the rest of the dependencies is to run: +Then: ```bash -conda install cmake pkg-config ffmpeg -c conda-forge +pip install torchcodec ``` - -To clone and install the repo, run: +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.: ```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 - -pip install -e ".[dev]" --no-build-isolation -vv +conda install ffmpeg +# or +conda install ffmpeg -c conda-forge ``` +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`. + that MacOS users can `pip install torchcodec`. For now this is only supported + on Linux, but MacOS users can [build from source](./CONTRIBUTING.md). - [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 b6b748eb1..41919be98 100644 --- a/docs/source/install_instructions.rst +++ b/docs/source/install_instructions.rst @@ -1,30 +1,32 @@ Installation Instructions ========================= -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: +.. note:: + TorchCodec is only available on Linux for now. We plan to support other + platforms in the future. -- A C++ compiler+linker. This is typically available on a baseline Linux - installation already. -- cmake -- pkg-config -- FFmpeg -- PyTorch nightly +Installing torchcodec should be as simple as: -Start by installing PyTorch following the `official instructions -`_. +.. code:: bash -Then, the easiest way to install the rest of the dependencies is to run: + pip install torchcodec - conda install cmake pkg-config ffmpeg -c conda-forge +You will need a working PyTorch installation, which you can install following +the `official instructions `_. -To clone and install the repo, run: +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.: - git clone git@github.com:pytorch/torchcodec.git - # Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git - cd torchcodec +.. code:: bash - pip install -e ".[dev]" --no-build-isolation -vv + conda install ffmpeg + # or + conda install ffmpeg -c conda-forge +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 +`_.