Skip to content

Commit 361968f

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
DOC: build from source for now (#133)
Summary: Pull Request resolved: #133 Reviewed By: scotts, ahmadsharif1 Differential Revision: D60521151 Pulled By: NicolasHug fbshipit-source-id: 2f36e8a649d9f9aa44eeadecbbe15f26ed4bc1eb
1 parent 699e8c6 commit 361968f

File tree

2 files changed

+41
-36
lines changed

2 files changed

+41
-36
lines changed

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,38 +81,45 @@ ffmpeg -f lavfi -i \
8181

8282
## Installing TorchCodec
8383

84-
Note: if you're on MacOS, you'll need to [build from source](./CONTRIBUTING.md).
85-
Instructions below assume you're on Linux.
86-
87-
First install the latest stable version of PyTorch following the [official
84+
We'll be providing wheels in the coming days so that you can just install
85+
torchcodec using `pip`. For now, you can just build from source. You will need
86+
the following dependencies:
87+
88+
- A C++ compiler+linker. This is typically available on a baseline Linux
89+
installation already.
90+
- cmake
91+
- pkg-config
92+
- FFmpeg
93+
- PyTorch nightly
94+
95+
Start by installing PyTorch following the [official
8896
instructions](https://pytorch.org/get-started/locally/).
8997

90-
Then:
98+
Then, the easiest way to install the rest of the dependencies is to run:
9199

92100
```bash
93-
pip install torchcodec
101+
conda install cmake pkg-config ffmpeg -c conda-forge
94102
```
95-
You will also need FFmpeg installed on your system, and TorchCodec decoding
96-
capabilities are determined by your underlying FFmpeg installation. There are
97-
different options to install FFmpeg e.g.:
103+
104+
To clone and install the repo, run:
98105

99106
```bash
100-
conda install ffmpeg
101-
# or
102-
conda install ffmpeg -c conda-forge
107+
git clone [email protected]:pytorch/torchcodec.git
108+
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git
109+
cd torchcodec
110+
111+
pip install -e ".[dev]" --no-build-isolation -vv
103112
```
104113

105-
Your Linux distribution probably comes with FFmpeg pre-installed as well.
106114
TorchCodec supports all major FFmpeg version in [4, 7].
107115

108-
109116
## Planned future work
110117

111118
We are actively working on the following features:
112119

120+
- Ship wheels for Linux, so that Linux users can `pip install torchcodec`.
113121
- [Ship wheels for MacOS](https://github.com/pytorch/torchcodec/issues/111), so
114-
that MacOS users can `pip install torchcodec`. For now this is only supported
115-
on Linux, but MacOS users can [build from source](./CONTRIBUTING.md).
122+
that MacOS users can `pip install torchcodec`.
116123
- [GPU decoding](https://github.com/pytorch/torchcodec/pull/58)
117124
- [Audio decoding](https://github.com/pytorch/torchcodec/issues/85)
118125

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
Installation Instructions
22
=========================
33

4-
.. note::
5-
TorchCodec is only available on Linux for now. We plan to support other
6-
platforms in the future.
4+
We'll be providing wheels in the coming days so that you can just install
5+
torchcodec using ``pip``. For now, you can just build from source. You will need
6+
the following dependencies:
77

8-
Installing torchcodec should be as simple as:
8+
- A C++ compiler+linker. This is typically available on a baseline Linux
9+
installation already.
10+
- cmake
11+
- pkg-config
12+
- FFmpeg
13+
- PyTorch nightly
914

10-
.. code:: bash
15+
Start by installing PyTorch following the `official instructions
16+
<https://pytorch.org/get-started/locally/>`_.
1117

12-
pip install torchcodec
18+
Then, the easiest way to install the rest of the dependencies is to run:
1319

14-
You will need a working PyTorch installation, which you can install following
15-
the `official instructions <https://pytorch.org/get-started/locally/>`_.
20+
conda install cmake pkg-config ffmpeg -c conda-forge
1621

17-
You will also need FFmpeg installed on your system, and TorchCodec decoding
18-
capabilities are determined by your underlying FFmpeg installation. There are
19-
different options to install FFmpeg e.g.:
22+
To clone and install the repo, run:
2023

21-
.. code:: bash
24+
git clone [email protected]:pytorch/torchcodec.git
25+
# Or, using https instead of ssh: git clone https://github.com/pytorch/torchcodec.git
26+
cd torchcodec
2227

23-
conda install ffmpeg
24-
# or
25-
conda install ffmpeg -c conda-forge
28+
pip install -e ".[dev]" --no-build-isolation -vv
2629

27-
Your Linux distribution probably comes with FFmpeg pre-installed as well.
2830
TorchCodec supports all major FFmpeg version in [4, 7].
29-
30-
Note that installation instructions may slightly change over time. The most
31-
up-to-date instructions should be available from the `README
32-
<https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec>`_.

0 commit comments

Comments
 (0)