Перейти к содержанию

Настройка PyPI

pypi:
  enabled: true
  repository:
    - name: pypi
      registry: https://pypi.org
      packages-registry: https://files.pythonhosted.org
      scan-manifest: true
      scan-package: true
      work-mode: strict_wait
      url-encoded-config: true
    - name: pytorch-pypi
      registry: https://download.pytorch.org
      packages-registry: https://download.pytorch.org
      additional-packages-registries:
        download.pytorch.org: https://download.pytorch.org
        download-r2.pytorch.org: https://download-r2.pytorch.org
        files.pythonhosted.org: https://files.pythonhosted.org
      scan-manifest: true
      scan-package: true
      work-mode: strict_wait
      url-encoded-config: true

Пример pip.conf:

[global]
index-url = https://osa-proxy.example.com/pypi/simple/

Постоянная настройка через pip config:

python -m pip config set global.index-url https://osa-proxy.example.com/pypi/simple/

Разовые установки:

pip install --index-url https://osa-proxy.example.com/pypi/simple/ requests

Для PyTorch используйте отдельный репозиторий:

pip install --index-url https://osa-proxy.example.com/pytorch-pypi/whl/cu121 torch
Страница была полезна?