Monday, August 10, 2020

Python⇒Speed: Options for packaging your Python code: Wheels, Conda, Docker, and more

You’ve written your Python application—a server, CLI tool, or batch process—and now you need to distribute it to the machines where it will be running. In order to run your application, you will need:

  1. Your code.
  2. Various Python libraries your code depends on, like Flask or NumPy.
  3. The shared libraries in other langauges (C, C++, etc.) that your code and its Python dependencies depend on.
  4. The Python interpreter.
  5. The shared libraries Python depends on, typically C libraries like libc and OpenSSL.

How exactly do you package up your application so all of these are available? There’s Docker, of course, but there are actually many more options, from wheels to system packages to Conda to PEX to self-contained executables, each with their own tradeoffs. And that’s just a partial list!

Given the large range of choices, there are too many to cover each in detail. Instead, this article will give a sense of the different categories, the pros and cons, and provide links to specific implementations within each category. For simplicity’s sake I will only cover running on Linux.

Read more...

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...