Earlier quoted context omitted.
virtualenv still requires internet access. You'd have to create a venv on destination machine and pip install your packages in. You can't scp a local venv onto destination machine and have it work.
You just need a venv with the right architecture, which is fairly trivial. You can then copy the venv directly over. See this repo: https://github.com/unixtreme/D3Edit . It has Linux/Mac/Windows virtualenvs and it works without any additional setup
Processing 40TB of code from 10M projects with a dedicated server and Go
71–80 of 83 posts
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#72Earlier quoted context omitted.
Installing a full virtualenv with all related libraries just to run one script is kind of ridiculous. The server might have the wrong Python version available (2.x vs 3.x, multiple evolutions of 3.x with big features added in each point release). Et cetera, et cetera. Or you could just do it with bash or a static Go binary and be done with it. Portable, works pretty much everywhere.
> The server might have the wrong Python version available That's the point of using virtual environments, so that you can run the Python version and libraries that you need. Also, as of 3.3, Python ships with venv which means you don't need to separately install virtualenv anymore. It's all very portable.
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#73Earlier quoted context omitted.
Installing a full virtualenv with all related libraries just to run one script is kind of ridiculous. The server might have the wrong Python version available (2.x vs 3.x, multiple evolutions of 3.x with big features added in each point release). Et cetera, et cetera. Or you could just do it with bash or a static Go binary and be done with it. Portable, works pretty much everywhere.
Why is it ridiculous? You'll need the related libraries either case, and by default virtualenv uses symlinks. The "full virtualenv" part makes it sound like it's heavy, or something like that.
Imagine a situation where you'd need to perform an operation on a hundred servers, would you either transfer one static exacutable or build an virtualenv in every machine and download correct versions all of the related libraries?
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#74Earlier quoted context omitted.
Installing a full virtualenv with all related libraries just to run one script is kind of ridiculous. The server might have the wrong Python version available (2.x vs 3.x, multiple evolutions of 3.x with big features added in each point release). Et cetera, et cetera. Or you could just do it with bash or a static Go binary and be done with it. Portable, works pretty much everywhere.
> The server might have the wrong Python version available That's the point of using virtual environments, so that you can run the Python version and libraries that you need. Also, as of 3.3, Python ships with venv which means you don't need to separately install virtualenv anymore. It's all very portable.
Not all operating systems carry Python >3.3 by default, that would mean installing backports or unofficial repositories on production machines.
Or you can use a static binary that just works.
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#75Earlier quoted context omitted.
Why is it ridiculous? You'll need the related libraries either case, and by default virtualenv uses symlinks. The "full virtualenv" part makes it sound like it's heavy, or something like that.
If you do it in a language that provides static binaries or an equivalent, you don't need to pull dozens of libraries with possibly hundreds of files just to run a single script. Imagine a situation where you'd need to perform an operation on a hundred servers, would you either transfer one static exacutable or build an virtualenv in every machine and download correct versions all of the related libraries?
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#76Earlier quoted context omitted.
.yml only makes sense in a word where every other extension is three letters. With variably length extensions, there isn't a good reason to not just use the full name.
Who cares? Just switch to .jsn and forget about it.
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#77First I've heard of "Taco Bell Programming"[1]. I love it, this needs to become a normal part of my lexicon. Also heck yes, it completely mirrors my experience - a few dozen tools combine in fairly simple ways to make absurdly useful results. The problem is finding the useful N-dozen elemental tools you'll use. [1]: http://widgetsandshit.com/teddziuba/2010/10/taco-bell-progra...
> I could have done the whole thing Taco Bell style if I had only manned up and broken out sed, but I pussied out and wrote some Python. And with one dumb word choice, I suddenly can't share this otherwise good piece with most audiences.
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#78> If someone wants to host the raw files to allow others to download it let me know. It is a 83 GB tar.gz file which uncompressed is just over 1 TB in size. Some of the cloud providers have free hosting for public data sets (people who use the data incur cost to download/process the data). I'm not sure if this would qualify. * https://aws.amazon.com/opendata/public-datasets/ * https://azure.microsoft.com/en-us/servic…
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#79First I've heard of "Taco Bell Programming"[1]. I love it, this needs to become a normal part of my lexicon. Also heck yes, it completely mirrors my experience - a few dozen tools combine in fairly simple ways to make absurdly useful results. The problem is finding the useful N-dozen elemental tools you'll use. [1]: http://widgetsandshit.com/teddziuba/2010/10/taco-bell-progra...
> I could have done the whole thing Taco Bell style if I had only manned up and broken out sed, but I pussied out and wrote some Python. And with one dumb word choice, I suddenly can't share this otherwise good piece with most audiences.
Re: Processing 40TB of code from 10M projects with a dedicated server and Go
#80> I actually wrote a Python solution at first, but having to install the pip dependencies on my clean varnish box seemed like a bad idea and it keep breaking in odd ways which I didn’t feel like debugging. Amen! This is why I am learning Go at the moment and considering using it instead of Python for admin and data processing tasks on a fleet of servers. The single binary deployment makes it a lot easier for users to…
It can produce a single .pyz file which has all dependencies except the interpreter itself inside. Actually this format is compatible all the way back to Python 2.6, it's only the zipapp convenience scripts that are new.
https://docs.python.org/3/library/zipapp.html#creating-stand...