• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

palantir/gradle-miniconda-plugin: Plugin that sets up a Python environment for b ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

palantir/gradle-miniconda-plugin

开源软件地址(OpenSource Url):

https://github.com/palantir/gradle-miniconda-plugin

开源编程语言(OpenSource Language):

Java 75.9%

开源软件介绍(OpenSource Introduction):

Gradle Miniconda Plugin Circle CI

Plugin that sets up a Python environment for building and running tests using Miniconda.

Usage

Apply the plugin to your project following https://plugins.gradle.org/plugin/com.palantir.python.miniconda, and configure the associated extension:

Minimal configuration:

miniconda {
    minicondaVersion = '3.19.0'
    packages = ['python']
}

Then invoke the setupPython task and use the resulting installation directory from Exec tasks:

task launchNotebook(type: Exec) {
    dependsOn 'setupPython'
    executable "${miniconda.buildEnvironmentDirectory}/bin/python"
    args '-c', 'print("Hello world!")'
}

Options

Name Default Value Description Optional
minicondaVersion N/A The miniconda version which you want to use. See the miniconda repo false
packages N/A The conda packages you want installed into your conda environment. This list must contain at least one argument. false
bootstrapDirectoryPrefix new File(System.getProperty('user.home'), '.miniconda') The root directory to put the root install of miniconda. This helps performance by caching the root environment by pythonVersion and minicondaVersion. true
buildEnvironmentDirectory new File(buildDir, 'miniconda') The directory to place your specific miniconda environment. true
pythonVersion 2 The python version you want for your miniconda. If you want Miniconda3, this value is 3. true
channels ['https://repo.continuum.io/pkgs/free'] The list of conda channels you want to use for downloading conda packages. Must not be empty. true

Here is an example of the plugin with all the bells and whistles.

miniconda {
    bootstrapDirectoryPrefix = new File(System.getProperty('user.home'), '.miniconda')
    buildEnvironmentDirectory = new File(buildDir, 'python')
    minicondaVersion = '3.19.0'
    packages = ['ipython-notebook']
    pythonVersion = 2
    channels = ['https://repo.continuum.io/pkgs/free', 'conda-forge']
}

If you need to customize where the Miniconda installer script is downloaded from, you can add your artifact to the minicondaInstaller configuration. The default location where it is downloaded from is: https://repo.continuum.io.

Tasks

bootstrapPython

Installs Miniconda.

setupPython

Sets up conda environment in the project running conda create.

condaBuildSetup

Installs conda-build using conda install conda-build.

condaBuildCheck

Only checks (validates) the recipe.

condaBuild

Builds and packages the project using conda build.

License

Gradle Miniconda Plugin is released by Palantir Technologies, Inc. under the Apache 2.0 License. See the included LICENSE file for details.

Backwards Compatibility Breaks

0.5.0

The bootstrap Python is now placed in bootstrapDirectoryPrefix/python-$pythonVersion/miniconda-$minicondaVersion.

0.4.0

The bootstrap Python is now placed in bootstrapDirectoryPrefix/minicondaVersion. Users now must set bootstrapDirectoryPrefix instead of bootstrapDirectory. You can still get the new directory of the bootstrap Python by referring to the bootstrapDirectory property.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap