-
-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Labels
bugSomething isn't workingSomething isn't working
Description
OS
Linux
GPU Library
CUDA 12.x
Python version
3.12
Describe the bug
Using ghcr.io/theroyallab/tabbyapi:latest (downloaded as of a few minutes ago), I get errors about the python 'requests' package being missing:
Attaching to tabbyapi
tabbyapi | /app/common/logger.py:68: SyntaxWarning: invalid escape sequence '\<'
tabbyapi | message = message.replace("{", "{{").replace("}", "}}").replace("<", "\<")
tabbyapi | Traceback (most recent call last):
tabbyapi | File "/app/main.py", line 16, in <module>
tabbyapi | from common import gen_logging, sampling, model
tabbyapi | File "/app/common/model.py", line 43, in <module>
tabbyapi | from backends.infinity.model import InfinityContainer
tabbyapi | File "/app/backends/infinity/model.py", line 12, in <module>
tabbyapi | from infinity_emb import EngineArgs, AsyncEmbeddingEngine
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/__init__.py", line 20, in <module>
tabbyapi | from infinity_emb.engine import AsyncEmbeddingEngine, AsyncEngineArray # noqa: E402
tabbyapi | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/engine.py", line 7, in <module>
tabbyapi | from infinity_emb.inference import (
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/inference/__init__.py", line 1, in <module>
tabbyapi | from infinity_emb.inference.batch_handler import BatchHandler
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/inference/batch_handler.py", line 29, in <module>
tabbyapi | from infinity_emb.transformer.abstract import BaseTransformer
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/transformer/abstract.py", line 20, in <module>
tabbyapi | from infinity_emb.transformer.quantization.interface import quant_embedding_decorator
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/transformer/quantization/interface.py", line 6, in <module>
tabbyapi | import requests # type: ignore
tabbyapi | ^^^^^^^^^^^^^^^
tabbyapi | ModuleNotFoundError: No module named 'requests'
I worked around that with a Dockerfile deriving from the above image but with RUN python3.12 pip install requests, but then immediately got another import error:
Attaching to tabbyapi
tabbyapi | /app/common/logger.py:68: SyntaxWarning: invalid escape sequence '\<'
tabbyapi | message = message.replace("{", "{{").replace("}", "}}").replace("<", "\<")
tabbyapi | Traceback (most recent call last):
tabbyapi | File "/app/main.py", line 16, in <module>
tabbyapi | from common import gen_logging, sampling, model
tabbyapi | File "/app/common/model.py", line 43, in <module>
tabbyapi | from backends.infinity.model import InfinityContainer
tabbyapi | File "/app/backends/infinity/model.py", line 12, in <module>
tabbyapi | from infinity_emb import EngineArgs, AsyncEmbeddingEngine
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/__init__.py", line 20, in <module>
tabbyapi | from infinity_emb.engine import AsyncEmbeddingEngine, AsyncEngineArray # noqa: E402
tabbyapi | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/engine.py", line 7, in <module>
tabbyapi | from infinity_emb.inference import (
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/inference/__init__.py", line 1, in <module>
tabbyapi | from infinity_emb.inference.batch_handler import BatchHandler
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/inference/batch_handler.py", line 30, in <module>
tabbyapi | from infinity_emb.transformer.utils import get_lengths_with_tokenize
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/transformer/utils.py", line 6, in <module>
tabbyapi | from infinity_emb.transformer.crossencoder.optimum import OptimumCrossEncoder
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/transformer/crossencoder/optimum.py", line 9, in <module>
tabbyapi | from infinity_emb.transformer.utils_optimum import (
tabbyapi | File "/opt/venv/lib/python3.12/site-packages/infinity_emb/transformer/utils_optimum.py", line 5, in <module>
tabbyapi | from huggingface_hub import HfApi, HfFolder # type: ignore
tabbyapi | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tabbyapi | ImportError: cannot import name 'HfFolder' from 'huggingface_hub' (/opt/venv/lib/python3.12/site-packages/huggingface_hub/__init__.py)
Reproduction steps
A docker-compose.yaml as follows should trigger it, with a fresh pull of the image:
services:
tabbyapi:
image: ghcr.io/theroyallab/tabbyapi:latest
Expected behavior
Loads, runs, serves requests
Logs
No response
Additional context
No response
Acknowledgements
- I have looked for similar issues before submitting this one.
- I have read the disclaimer, and this issue is related to a code bug. If I have a question, I will use the Discord server.
- I understand that the developers have lives and my issue will be answered when possible.
- I understand the developers of this program are human, and I will ask my questions politely.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working