GLM-OCR / pyproject.toml
changh95's picture
tt-model push glm-ocr (container)
aa204f5 verified
Raw History Blame Contribute Delete
1.9 kB
# SPDX-License-Identifier: Apache-2.0
# Python package of GLM-OCR on Tenstorrent p150 (changh95/GLM-OCR), from the ROOT of the model repo:
# pip install -e . # the Python API
# pip install -e ".[server,test]" # + the HTTP server and the tests
# Install it into an environment that already has tt-metal's ttnn (and its torch 2.11.0+cpu): ttnn and torch are NOT
# declared. This file lives at the repo root ON PURPOSE (never in code/: tt-model copies code/ over /opt/tt-metal).
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "tt-glmocr"
dynamic = ["version"]
description = "GLM-OCR (0.9B document OCR: text, tables, formulas, JSON extraction) on Tenstorrent Blackhole p150 (tt-nn), with a Python API and an OpenAI-compatible streaming HTTP server"
readme = "code/PYTHON.md"
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = ["numpy>=1.24.4,<2", "safetensors", "huggingface_hub", "tokenizers", "pillow"]
[project.optional-dependencies]
server = ["fastapi", "uvicorn"]
test = ["pytest", "httpx"]
[project.urls]
"Model card" = "https://huggingface.co/changh95/GLM-OCR"
"Weights" = "https://huggingface.co/zai-org/GLM-OCR"
"Official SDK" = "https://github.com/zai-org/GLM-OCR"
[tool.setuptools.dynamic]
version = { attr = "tt_glmocr.api.__version__" }
[tool.setuptools.packages.find]
where = ["code"]
include = ["tt_glmocr*"] # with the vendored tt_glmocr.ttaw (common/tools/vendor.py; never edit it)
exclude = ["tt_glmocr.tests*"]
[tool.setuptools.package-data]
"tt_glmocr" = ["samples/*/*", "licenses/*"]
"tt_glmocr.tt.mk_dec" = ["kernels/*.cpp", "kernels/*.hpp"]
"tt_glmocr.ttaw" = ["API.md", "VENDORED.json"]
"tt_glmocr.ttaw.ops" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
[tool.pytest.ini_options]
markers = ["device: needs a Tenstorrent chip (skipped on host-only runs)"]