Changes
- Increased execute commands timeout from 10 to 30 minutes
WORKSPACE setup
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_conda",
sha256 = "3258a44335f10a8ecffd983a5caf5f5c37b92ea191bfe743bb85280ef864cfd9",
url = "https://github.com/spietras/rules_conda/releases/download/0.0.2/rules_conda-0.0.2.zip"
)
load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")
# download and install conda
load_conda(
version="4.8.4" # optional, defaults to 4.8.4
)
# create environment with python2
conda_create(
name = "py2_env",
environment = "@//third_party/conda:py2_environment.yml" # label pointing to environment.yml file
)
# create environment with python3
conda_create(
name = "py3_env",
environment = "@//third_party/conda:py3_environment.yml" # label pointing to environment.yml file
)
# register pythons from environment as toolchain
register_toolchain(
py2_env = "py2_env", # python2 is optional
py3_env = "py3_env"
)