breezy-pizza-55668
08/16/2024, 12:18 PMtransformers
dependency.
If I try to add torch to my BUILD dependencies, with these overrides:
python_requirements(
name="reqs",
source="pyproject.toml",
overrides={
"transformers": {"dependencies": [":reqs#torch"]},
"tensorflow": {
"requirements": (
# Linux or intel Mac
"tensorflow == 2.15.0 ; sys_platform != 'darwin' or platform_machine == 'x86_64'",
# Mac M1
"tensorflow-macos == 2.15.0 ; sys_platform == 'darwin' and platform_machine == 'arm64'",
),
},
},
)
I get the following error (only when I run on GKE with Docker)
2024-08-16 06:34:39.649 BRT
/usr/bin/python3: can't find '__main__' module in '/home/api/app/api.pex'
If I remove the torch dependency and install torch on the container directly, with my PEX binary like this:
pex_binary(
name="prod",
dependencies=[":api"],
entry_point="src/serve.py",
inherit_path="fallback",
)
it works
any ideias what can be happening?