Introduction
Artifactory supports PyTorch PyPI repository with the public remote registry URL: https://download.pytorch.org
This article will guide you through:
Resolution
-
Log in to Artifactory and go to Administration -> Repositories -> Create a Repository.

-
Select PyPI as the package type.
-
Configure the repository:

Note:
The 404 on Test connection for https://download-r2.pytorch.org/ is expected and does not mean the remote is misconfigured.
Test Connection sends a HEAD request to the URL field only. It does not append Registry Suffix. That host is a CDN/object-store root, so / has no index page and returns 404 (the same result as opening the URL in a browser)
-
Open the new repository and click Set Me Up to generate the client configuration.

-
Run a simple test command against the remote repository.
python -m pip install --index-url
"https://<user>:<token>@<your-artifactory-url>/artifactory/api/pypi/pypi-pytorch-remote/simple"
--no-deps "torch==2.2.2+cpu"
Example (replace with your own URL if different):
python -m pip install --index-url
"https://<user>:<token>@<your-artifactory-url>/artifactory/api/pypi/pypi-pytorch-remote/simple"
--no-deps "torch==2.2.2+cpu"
Expected result: `Successfully installed torch-2.2.2+cpu`
Looking in indexes:
https://admin:****@<your-artifactory-url>/artifactory/api/pypi/pypi-pytorch-remote/simple
Collecting torch==2.2.2+cpu
Using cached
https://<your-artifactory-url>/artifactory/api/pypi/pypi-pytorch-remote/packages/whl/cpu/torch-2.2.2%2Bcpu-cp311-cp311-linux_x86_64.whl
(186.8 MB)
Installing collected packages: torch
Successfully installed torch-2.2.2+cpu
Resolving PyTorch Packages Through a Smart Remote Repository
When a second JPD (for example an Edge node) proxies the PyTorch remote created above, the standard PyPI Smart Remote guidance of using different paths for the Remote URL (without /api/pypi/) and the Registry URL does not apply.
That guidance relies on the upstream serving files beneath a top-level /packages/ directory, as pypi.org does, whereas PyTorch serves its wheels under /whl/. As a result the Smart Remote resolves the package index successfully but returns 404 on the wheel download, so both fields must use the /api/pypi/ form:
-
Remote URL: https://<SOURCE_JPD_URL>/artifactory/api/pypi/<PYTORCH_REPO_KEY>
-
Registry URL: https://<SOURCE_JPD_URL>/artifactory/api/pypi/<PYTORCH_REPO_KEY>
-
Registry Index Location URL Suffix: simple
Enter a username and password for the source JPD, or a valid access token issued by the source JPD, then click Test to verify the connection.
Note:
The PyTorch remote repository on the source JPD remains configured as described above and must not be changed. If the Smart Remote has already served 404s, delete the content of its -cache repository and retest with pip install --no-cache-dir <package>.
Conclusion
By following these steps, you can create a PyTorch remote repository in Artifactory and generate the client configuration from Set Me Up for downstream package installation workflows. If a second JPD proxies that repository as a Smart Remote, set both the Remote URL and the Registry URL to https://<SOURCE_JPD_URL>/artifactory/api/pypi/<PYTORCH_REPO_KEY> so wheel downloads resolve correctly.