【python】【打包conda环境】【conda_pack.pack】

def pack(name=None, prefix=None, output=None, format='infer',
         arcroot='', dest_prefix=None,
         parcel_root=None, parcel_name=None,
         parcel_version=None, parcel_distro=None,
         verbose=False, force=False,
         compress_level=4, n_threads=1, zip_symlinks=False, zip_64=True,
         filters=None, ignore_editable_packages=False,
         ignore_missing_files=False):
    """Package an existing conda environment into an archive file.

    Parameters
    ----------
    name : str, optional
        The name of the conda environment to pack.
    prefix : str, optional
        A path to a conda environment to pack.
        Only one of ``name`` and ``prefix`` should be supplied.
    output : str, optional
        The path of the output file. Defaults to the environment name with a
        suffix determined by the format; e.g. ``my_env.tar.gz``.
    format : {'infer', 'zip', 'tar.gz', 'tgz', 'tar.bz2', 'tbz2', 'tar', 'parcel'}, optional
        The archival format to use. By default, this is inferred from the output
        file extension, and defaults to ``tar.gz`` if ``output`` is not supplied.
    arcroot : str, optional
        The relative path in the archive to the conda environment.
        Defaults to ''.
    dest_prefix : str, optional
        If present, prefixes will be rewritten to this path before packaging.
        In this case the ``conda-unpack`` script will not be generated.
    parcel_root, parcel_name, parcel_version, parcel_distro : str, optional
        (Parcels only) the root directory, name, version, and target
        distribution of the parcel. The name and version will be embedded
        into parcel metadata. The default values are:

        - ``parcel_root``: ``/opt/cloudera/parcels``
        - ``parcel_name``: the base name of the environment directory
        - ``parcel_version``: the current date in ``YYYY.MM.DD`` format.
        - ``parcel_distro``: ``el7``

        It is important that ``parcel_root`` match the directory into which all
        parcels are unpacked on your cluster. Neither ``parcel_name`` nor
        ``parcel_version`` may contain dashes. The final destination of the parcel
        is assumed to be ``parcel_root/parcel_name-parcel_version``, and both
        ``arcroot`` and ``dest_prefix`` are set accordingly. The default filename
        will be ``parcel_name-parcel_version-parcel_distro.parcel``.
    verbose : bool, optional
        If True, progress is reported to stdout. Default is False.
    force : bool, optional
        Whethe
  • 7
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

资源存储库

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值