portable conda environment as a binary tarball

心已入冬 提交于 2019-12-05 07:49:01

I just found conda-pack that seems address this issue directly

https://github.com/conda/conda-pack

conda-pack is a command line tool for creating relocatable conda environments. This is useful for deploying code in a consistent environment, potentially in a location where python/conda isn't already installed.

Documentation: https://conda.github.io/conda-pack/

Use Cases:

  • Bundling an application with its environment for deployment
  • Packaging a conda environment for usage with Apache Spark when deploying on YARN (see here for more information).
  • Packaging a conda environment for deployment on Apache YARN. One way to do this is to use Skein.
  • Archiving an environment in a functioning state.

Update: Some other of our PySpark applications are using a conda environment on a location that's available on all Hadoop nodes (NFS mount) and it works very well for some conda environments that don't have a ton of dependencies.

Packages are saved in <conda_root>/pkgs. You can copy these files (as well as the anaconda installer script) to your deployment server, install anaconda, and running conda install <path_to_pkgs>/*.bz2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!