Skip to content

Commit

Permalink
Add recipe for tensorflow-hub
Browse files Browse the repository at this point in the history
On behalf for issues:

- tensorflow/text#644
- conda-forge/tensorflow-feedstock#276 (comment)


A recipe for [tensorflow-hub](https://www.tensorflow.org) is provided
  • Loading branch information
Anselmoo committed Dec 26, 2022
1 parent be16e3e commit 9b0d244
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/tensorflow_hub/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -ex
python -m pip install --no-deps --ignore-installed ./tensorflow_hub-${PKG_VERSION}-py2.py3-none-any.whl
# Remove the strict protobuf requirement. Conda will manage it.
sed -i.bak 's/protobuf>=3.4.0/protobuf/' ${SP_DIR}/tensorflow_hub/__init__.py
59 changes: 59 additions & 0 deletions recipes/tensorflow_hub/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% set name = "tensorflow-hub" %}
{% set version = "0.12.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/py2.py3/t/tensorflow_hub/tensorflow_hub-{{ version }}-py2.py3-none-any.whl
sha256: 822fe5f7338c95efcc3a534011c6689e4309ba2459def87194179c4de8a6e1fc

build:
number: 0
noarch: python
entry_points:
- make_image_classifier = tensorflow_hub.tools.make_image_classifier.make_image_classifier:run_main
- make_nearest_neighbour_index = tensorflow_hub.tools.make_nearest_neighbour_index.make_nearest_neighbour_index:main

requirements:
host:
- python >=3.7
- pip
run:
- python >=3.7
- wheel >=0.26
- numpy >=1.12.0
- six >=1.10.0
- protobuf >=3.9.2
- tensorflow >=2.0.0
- pillow >=9.0.0
- keras-preprocessing >=1.1.2
- apache-beam >=2.27.0
- python-annoy >=1.17.0
- pillow >=5.2.0
- scipy >=0.19.1

test:
requires:
- pip
imports:
- tensorflow_hub
- tensorflow_hub.tools
- tensorflow_hub.tools.make_image_classifier
- tensorflow_hub.tools.make_nearest_neighbour_index

about:
home: https://github.com/tensorflow/hub
license: Apache-2.0
license_file: LICENSE
summary: A library for transfer learning by reusing parts of TensorFlow models.
description: |
TensorFlow Hub is a library for the publication, discovery, and consumption
of reusable parts of machine learning models in TensorFlow.
doc_url: https://www.tensorflow.org/hub
dev_url: https://github.com/tensorflow/hub

extra:
recipe-maintainers:
- anselmoo

0 comments on commit 9b0d244

Please sign in to comment.