Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,29 @@ Installation
$ pip install vws-python-mock

This requires Python |minimum-python-version|\+.

Faster installation
~~~~~~~~~~~~~~~~~~~

This package depends on `PyTorch`_, which pip installs from PyPI as a large CUDA-enabled build (~873 MB) even on CPU-only machines.
To get a much smaller CPU-only build (~200 MB, no CUDA dependencies), install ``torch`` and ``torchvision`` from PyTorch's CPU index before installing this package:

.. code-block:: console

$ pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
$ pip install vws-python-mock

If you manage dependencies with ``uv``, add the following to your ``pyproject.toml`` instead:

.. code-block:: toml

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[tool.uv.sources]
torch = { index = "pytorch-cpu" }
torchvision = { index = "pytorch-cpu" }

.. _PyTorch: https://pytorch.org