diff --git a/recipes/tensorflow-text/build.sh b/recipes/tensorflow-text/build.sh new file mode 100644 index 0000000000000..9bbc8dcc51886 --- /dev/null +++ b/recipes/tensorflow-text/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -exuo pipefail + +export HERMETIC_PYTHON_VERSION=$(${PYTHON} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") + +./oss_scripts/run_build.sh +${PYTHON} -m pip install --no-deps --no-build-isolation -vv tensorflow_text-*.whl +bazel clean diff --git a/recipes/tensorflow-text/meta.yaml b/recipes/tensorflow-text/meta.yaml new file mode 100644 index 0000000000000..c29b8427289f8 --- /dev/null +++ b/recipes/tensorflow-text/meta.yaml @@ -0,0 +1,65 @@ +{% set version = "2.18.1" %} +{% set tensorflow_version = ".".join(version.split(".")[:2]) %} + +package: + name: tensorflow-text + version: {{ version }} + +source: + url: https://github.com/tensorflow/text/archive/v{{ version }}.tar.gz + sha256: 039f05f422a3ad55289a4897b5427d07cac7efe3943927c3b3c7a593f6123989 + +build: + number: 0 + skip: true # [win] + string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] + string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] + skip: true # [py!=312] + skip: true # [cuda_compiler_version != "None"] + +requirements: + build: + - {{ compiler('c') }} + - {{ stdlib('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] + # Sync with TensorFlow + - bazel 6.* + host: + - python + - pip + - packaging + - setuptools >=70 + - wheel + - libffi + - absl-py + - libabseil + - tensorflow {{ tensorflow_version }} + - tensorflow-base *=cuda* # [cuda_compiler_version != "None"] + - tensorflow-base *=cpu* # [cuda_compiler_version == "None"] + run: + - python + - tensorflow-base *=cuda* # [cuda_compiler_version != "None"] + - tensorflow-base *=cpu* # [cuda_compiler_version == "None"] + +test: + requires: + - pip + - absl-py + - pytest + - tf-keras + - tensorflow-datasets >=3.2.0 + commands: + - pip check + +about: + home: https://www.tensorflow.org/text/ + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: TF.Text is a TensorFlow library of text related ops, modules, and subgraphs. + dev_url: https://github.com/tensorflow/text + +extra: + recipe-maintainers: + - ehfd