From 9fe70cf6dda92bcadbdfc091a321591028053819 Mon Sep 17 00:00:00 2001 From: Hsiou-Yuan Liu Date: Thu, 27 Jul 2023 18:03:31 -0400 Subject: [PATCH] doc: add pytorch example for explicit source --- docs/repositories.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/repositories.md b/docs/repositories.md index 9ff8598e7a4..61de4b32595 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -275,6 +275,15 @@ poetry source add --priority=explicit foo https://foo.bar/simple/ There can be more than one explicit package source. +{{% note %}} +A real-world example where an explicit package source is useful, is for PyTorch GPU packages. + +```bash +poetry source add --priority=explicit pytorch-gpu-src https://download.pytorch.org/whl/cu118 +poetry add --source pytorch-gpu-src torch torchvision torchaudio +``` +{{% /note %}} + #### Package Source Constraint All package sources (including secondary and possibly supplemental sources) will be searched during the package lookup