Skip to content

Commit 02a617a

Browse files
authored
Merge pull request #6 from sonatype-nexus-community/documentation
document how to use this project
2 parents 34ee2fa + b3f0fe4 commit 02a617a

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

README.md

+23-6
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,38 @@
77

88
---
99

10-
Introduce your project here. A short summary about what its purpose and scope is.
10+
This project provides a PyTorch Python index mirror that adds necessary strict PEP 503 format requirements permitting to use it with [Nexus Repository](https://help.sonatype.com/en/pypi-repositories.html#download--search--and-install-packages-using-pip).
1111

1212
- [Sonatype PyTorch PyPI Improved Mirror](#sonatype-pytorch-pypi-improved-mirror)
1313
- [Usage](#usage)
14+
- [Installation](#installation)
15+
- [Access With `pip`](#access-with-pip)
1416
- [Development](#development)
1517
- [The Fine Print](#the-fine-print)
1618

1719
## Usage
1820

19-
Use this section (and any additional sub-sections) to explain how to use this project.
21+
### Installation
2022

21-
Include:
22-
- Installation
23-
- Configuration
24-
- Execution
23+
As a [Nexus Repository](https://help.sonatype.com/en/sonatype-nexus-repository.html) admin, configure a [new PyPI proxy](https://help.sonatype.com/en/pypi-repositories.html#proxying-pypi-repositories) repository:
24+
- define name: `pypi-pytorch` for example
25+
- define URL for remote storage: `https://sonatype-nexus-community.github.io/pytorch-pypi/whl/`
26+
27+
You can also create compute platform specific proxies if necessary, like `pypi-pytorch-cu124` pointing to `https://sonatype-nexus-community.github.io/pytorch-pypi/whl/cu124/`
28+
29+
These PyPI proxies can also be added to your `pypi-all` group repository if you created one.
30+
31+
### Access With `pip`
32+
33+
Newly created PyPI proxies can now be used with `pip` using provided `--index-url`, like:
34+
35+
```
36+
pip3 install pytorch+cu124 --index-url http://localhost:8081/repository/pypi-pytorch/simple
37+
```
38+
or
39+
```
40+
pip3 install pytorch --index-url http://localhost:8081/repository/pypi-pytorch-cu124/simple
41+
```
2542

2643
## Development
2744

0 commit comments

Comments
 (0)