Skip to content

Generate Pypi-compatible indexes for our wheelhouses #114

@mboisson

Description

@mboisson

Using:
https://pypi.org/project/dumb-pypi/

We can generate a plain static file local Pypi index:

module load python/3.8
virtualenv dumb-pypi
source dumb-pypi/bin/activate
pip install dumb-pypi
pushd /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/; ls *.whl > ~/tmp/generic.lst; popd
dumb-pypi --package-list generic.lst --packages-url file:///cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/ --output-dir generic-index

To use that index:

unset PIP_CONFIG_FILE
pip install --index file:///home/mboisson/tmp/generic-index/simple torch
Looking in indexes: file:///home/mboisson/tmp/generic-index/simple
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/torch-1.9.1+computecanada-cp38-cp38-linux_x86_64.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/typing_extensions-4.3.0+computecanada-py3-none-any.whl
Installing collected packages: typing-extensions, torch
Successfully installed torch-1.9.1+computecanada typing-extensions-4.3.0+computecanada

What’s the significance of this ? We can generate and serve serverless instances of a local pypi. That means those can be used by tools that don’t support --find-links to point to a local directory containing wheels and only support pypi-style repositories (looking at you, poetry)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions