News for hackers. Stuff that matters.
Re:What to do about GPU packages on PyPI? by hirundo on Thursday May 20, 2021 @07:08PM (#27228585)
Maybe distribution via bittorrent is an alternative. It wouldn't be better performance than a good CDN but it distributes the costs better.
Re:What to do about GPU packages on PyPI? by kortex on Thursday May 20, 2021 @07:34PM (#27228782)
Conceptually, I love the idea of bittorrent distribution for binary packages like this. In practice, "oh no, my CI docker builds :(" Too much potential variability.

I just want a turnkey way to add multiple hosts/resolvers and use content-addressing. Like bittorrent but with passlists. Is that a thing?

Like, IPFS, but I want specific use-case domains. Like I'd be more than willing to stand up some sort of pip proxy for my company's domain but I'd only want it hosting packages used internally.

Re:What to do about GPU packages on PyPI? by namibj on Thursday May 20, 2021 @08:42PM (#27229247)
If pip had native IPFS support, you could do that by just pinning the packages you use on the local node.

You could also have an IPFS gateway with just normal HTTP(S) access control techniques and a normal pip, deferring to the swarm for packages that you haven't pinned. It's unhealthy for the swarm to stop your node from sharing it's data with other nodes, as that'd loose the Torrent swarm effects that unload the initial uploader (PyPI).

Re:What to do about GPU packages on PyPI? by StavrosK on Friday May 21, 2021 @06:37AM (#27232369)
There should really exist a transparent pip proxy, then I can set the config of all my CI machines to it and `pip install foo` would do the right thing and install from that cache. I just want a single binary that I can run with zero configuration and have it talk to PyPI and cache packages locally. It would save so much bandwidth.
Re:What to do about GPU packages on PyPI? by rcxdude on Friday May 21, 2021 @07:33AM (#27232729)
This is one of the key things which artifactory can do (and it can do it for basically any repository type, not just pypi). It's not so straightforward to set up, however.
Re:What to do about GPU packages on PyPI? by hksh on Friday May 21, 2021 @03:09PM (#27238541)
I have yet to discover a more-than-default-repository setup that is straightforward when using artifactory.
Re:What to do about GPU packages on PyPI? by ArchOversight on Monday May 24, 2021 @02:32PM (#27268006)
You are in luck, such a tool exists:

https://www.devpi.net

In the past I've run this in a docker container, setup some pip environment variables and its off to the races. It transparently caches stuff from PyPi and keeps things local.

Re:What to do about GPU packages on PyPI? by Epic_Wink on Saturday May 22, 2021 @08:39AM (#27245930)
Most CI vendors offer caching directories between builds, and then you set the pip cache directory. Failing that, I made a proxy server that can work transparently if you can set default environment variables: check out proxpi
Re:What to do about GPU packages on PyPI? by StavrosK on Saturday May 22, 2021 @08:48AM (#27245988)
proxpi is exactly what I was looking for, thank you! The straightforward Docker installation is especially great, I can have it running with one command.
Re:What to do about GPU packages on PyPI? by Macha on Friday May 21, 2021 @08:49AM (#27233345)
Such things certainly exist, we had one in my previous employer though I don't remember if it was something in-house, an artifactory feature, or something open source.
Re:What to do about GPU packages on PyPI? by StavrosK on Friday May 21, 2021 @08:52AM (#27233383)
Hmm, if you were using Artifactory, it sounds like that's what was doing that. I'm not aware of a dead simple, plug-and-play thing, though.
Re:What to do about GPU packages on PyPI? by mkj on Thursday May 20, 2021 @10:45PM (#27229965)
Extra variability could be an incentive for CI builds to do their own caching.
Re:What to do about GPU packages on PyPI? by toomuchtodo on Thursday May 20, 2021 @08:25PM (#27229138)
Nexus? We do this with Nexus.
Re:What to do about GPU packages on PyPI? by peterkelly on Thursday May 20, 2021 @07:52PM (#27228924)
IPFS sounds like the ideal solution here. In particular because it would mean you could set up a local node to act as a cache, and pin any packages you rely on.
Re:What to do about GPU packages on PyPI? by viraptor on Thursday May 20, 2021 @08:32PM (#27229185)
I'm eagerly waiting for ipfs-based package distribution channels. They would be great both for local caches and potentially getting closer sources in countries without great mirrors.
Re:What to do about GPU packages on PyPI? by namibj on Thursday May 20, 2021 @08:35PM (#27229198)
Termux (Android app, giving a mostly-normal terminal without root) already uses IPFS.

Requiring IPFS for accessing packages/wheels exceeding a threshold from PyPI seems reasonable.

Just have PyPI offer collaborative clusters[0] for a few common situations, and maybe work with the IPFS devs to get collaborative clusters to support only pinning a subset by path (like, only pinning the packages you depend on for local CI).

[0]: https://cluster.ipfs.io/documentation/collaborative/

Re:What to do about GPU packages on PyPI? by StavrosK on Friday May 21, 2021 @06:38AM (#27232380)
IPFS would be the ideal solution to so many things if it worked well. As it stands, I don't think it would be a solution to anything, it can hardly discover content on other peers in a timeframe less than minutes...
Re:What to do about GPU packages on PyPI? by actually_a_dog on Thursday May 20, 2021 @08:02PM (#27229007)
Re:What to do about GPU packages on PyPI? by kstrauser on Thursday May 20, 2021 @07:18PM (#27228675)
"Hmm, how can I get people to start using IPFS..."

Edit: Not sure about the downvotes. Joking tone aside, that actually seems like an ideal application for it.

Re:What to do about GPU packages on PyPI? by Zababa on Friday May 21, 2021 @05:30AM (#27232010)
I didn't downvote you but I can attempt to offer an explanation:

When reading the first part of your post, I read it as implying that the person you replied to is trying to push a secret agendo or something with IPFS. That's on me of course, and you seem to have no such intentions, but that's how I read it. Also, sarcasm can be hard to understand for some people, and even harder in text form.

I think including your "Joking tone aside, that actually seems like an ideal application for it." in your initial comment would have helped. It indicates that what was before was in part a joke, and inform people of your real position.

Re:What to do about GPU packages on PyPI? by kstrauser on Friday May 21, 2021 @10:31AM (#27234441)
Ah, got it. No, I was suggesting that IPFS may be a legitimate option here.