Skip to content Skip to sidebar Skip to footer

Python Deployment With Virtualenv (on A No-internet-access Server)

My production server has no access to the internet, so it's a bit a mess copying all the dependencies from my dev machine to the production/development server. If I'd use virtualen

Solution 1:

Three options I would consider:

  1. Run your own PyPI mirror with the dependencies you need. You really only need to build the file layout and pull from your local server using the index-url flag:

    $ pip install --index-url http://pypi.beastcraft.net/ numpy

  2. Build virtualenvs on the same architecture and copy those over as needed.

    This works, but you're taking a risk on true portability.

  3. Use terrarium to build virtual environments then bring those over (basically option 2 but with easier bookkeeping/automation).

I've done all of these and actually think that hosting your own PyPI mirror is the best option. It gives you the most flexibility when you're making a deployment or trying out new code.

Post a Comment for "Python Deployment With Virtualenv (on A No-internet-access Server)"