From 8ba4a8453e74195276371b71d49b9f1f3a146d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AE=87?= <506610466@qq.com> Date: Mon, 23 Dec 2024 16:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81edge=5Ftts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +- Dockerfile.copy | 2 +- .../custom_api_protocol.py | 20 ++ gpt_server/serving/openai_api_server.py | 26 ++- pyproject.toml | 5 + requirements.txt | 14 +- tests/test_tts.py | 12 ++ uv.lock | 197 +++++++++--------- 8 files changed, 183 insertions(+), 103 deletions(-) create mode 100644 tests/test_tts.py diff --git a/Dockerfile b/Dockerfile index 23f928e..d7d4f0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ # FROM docker.rainbond.cc/506610466/cuda:12.2.0-runtime-ubuntu20.04-uv -FROM 506610466/cuda:12.2.0-runtime-ubuntu20.04-uv +# FROM 506610466/cuda:12.2.0-runtime-ubuntu20.04-uv +# 从基础镜像开始构建,加快构建速度 +FROM 506610466/gpt_server:base COPY ./ /gpt_server WORKDIR /gpt_server - -RUN uv venv --seed && uv sync && uv cache clean && \ - echo '[[ -f .venv/bin/activate ]] && source .venv/bin/activate' >> ~/.bashrc +RUN uv sync && uv cache clean +# RUN uv venv --seed && uv sync && uv cache clean && \ +# echo '[[ -f .venv/bin/activate ]] && source .venv/bin/activate' >> ~/.bashrc CMD ["/bin/bash"] \ No newline at end of file diff --git a/Dockerfile.copy b/Dockerfile.copy index 4626fbb..5cddac1 100644 --- a/Dockerfile.copy +++ b/Dockerfile.copy @@ -1,4 +1,4 @@ -FROM docker.rainbond.cc/506610466/gpt_server:latest +FROM hub.geekery.cn/506610466/gpt_server:latest COPY ./ /gpt_server diff --git a/gpt_server/openai_api_protocol/custom_api_protocol.py b/gpt_server/openai_api_protocol/custom_api_protocol.py index f891245..cd3df43 100644 --- a/gpt_server/openai_api_protocol/custom_api_protocol.py +++ b/gpt_server/openai_api_protocol/custom_api_protocol.py @@ -14,6 +14,26 @@ from pydantic import Field, BaseModel +class SpeechRequest(BaseModel): + model: str = Field( + default="edge_tts", description="One of the available TTS models:" + ) + input: str = Field( + description="The text to generate audio for. The maximum length is 4096 characters." + ) + voice: str = Field( + default="zh-CN-YunxiNeural", + description="The voice to use when generating the audio", + ) + response_format: Optional[str] = Field( + default="mp3", description="The format of the audio" + ) + speed: Optional[float] = Field( + default=1.0, + description="The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.", + ) + + class ModerationsRequest(BaseModel): input: Union[str, List[str]] model: str diff --git a/gpt_server/serving/openai_api_server.py b/gpt_server/serving/openai_api_server.py index 8f3e50b..a339762 100644 --- a/gpt_server/serving/openai_api_server.py +++ b/gpt_server/serving/openai_api_server.py @@ -20,7 +20,7 @@ from fastapi import Depends, HTTPException from fastapi.exceptions import RequestValidationError from fastapi.middleware.cors import CORSMiddleware -from fastapi.responses import StreamingResponse, JSONResponse +from fastapi.responses import StreamingResponse, JSONResponse, FileResponse from fastapi.security.http import HTTPAuthorizationCredentials, HTTPBearer import httpx @@ -699,7 +699,31 @@ async def generate_completion(payload: Dict[str, Any], worker_addr: str): CustomEmbeddingsRequest, RerankRequest, ModerationsRequest, + SpeechRequest, ) +import edge_tts +import uuid + +OUTPUT_DIR = "./edge_tts_cache" + + +@app.post("/v1/audio/speech", dependencies=[Depends(check_api_key)]) +async def speech(request: SpeechRequest): + os.makedirs(OUTPUT_DIR, exist_ok=True) # 即使存在也不会报错 + list_voices = await edge_tts.list_voices() + support_list_voices = [i["ShortName"] for i in list_voices] + if request.voice not in support_list_voices: + return JSONResponse( + ErrorResponse( + message=f"不支持voice:{request.voice}", code=ErrorCode.INVALID_MODEL + ).dict(), + status_code=400, + ) + filename = f"{uuid.uuid4()}.mp3" + output_path = os.path.join(OUTPUT_DIR, filename) + communicate = edge_tts.Communicate(text=request.input, voice=request.voice) + await communicate.save(output_path) + return FileResponse(output_path, media_type="audio/mpeg", filename=filename) @app.post("/v1/moderations", dependencies=[Depends(check_api_key)]) diff --git a/pyproject.toml b/pyproject.toml index ae5daa8..9fc0e4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ dependencies = [ "qwen_vl_utils", "evalscope[perf]==0.7.0", "modelscope==1.20.1", + "edge-tts>=7.0.0", ] [tool.uv] @@ -37,6 +38,10 @@ override-dependencies = [ ] +[[tool.uv.index]] +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +default = true + [project.scripts] gpt_server = "gpt_server.cli:main" diff --git a/requirements.txt b/requirements.txt index 867169e..1221b0d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,6 +21,7 @@ aiohappyeyeballs==2.4.4 aiohttp==3.11.11 # via # datasets + # edge-tts # evalscope # fschat # fsspec @@ -75,6 +76,7 @@ cachetools==5.5.0 # streamlit certifi==2024.12.14 # via + # edge-tts # httpcore # httpx # requests @@ -84,7 +86,7 @@ cffi==1.17.1 # soundfile charset-normalizer==3.4.0 # via requests -click==8.1.7 +click==8.1.8 # via # nltk # ray @@ -133,6 +135,8 @@ diskcache==5.6.3 # outlines distro==1.9.0 # via openai +edge-tts==7.0.0 + # via gpt-server (pyproject.toml) editdistance==0.8.1 # via evalscope einops==0.8.0 @@ -256,7 +260,7 @@ interegular==0.3.3 # outlines-core jieba==0.42.1 # via evalscope -jinja2==3.1.4 +jinja2==3.1.5 # via # altair # gradio @@ -741,6 +745,8 @@ sortedcontainers==2.4.0 # via modelscope soundfile==0.12.1 # via infinity-emb +srt==3.5.3 + # via edge-tts sse-starlette==2.1.3 # via evalscope starlette==0.38.6 @@ -759,6 +765,7 @@ sympy==1.13.1 # torch tabulate==0.9.0 # via + # edge-tts # evalscope # sacrebleu tenacity==9.0.0 @@ -865,6 +872,7 @@ typing-extensions==4.12.2 # via # altair # anyio + # edge-tts # fastapi # gradio # gradio-client @@ -885,7 +893,7 @@ tzdata==2024.2 # via pandas unicorn==2.1.1 # via evalscope -urllib3==2.2.3 +urllib3==2.3.0 # via # modelscope # requests diff --git a/tests/test_tts.py b/tests/test_tts.py new file mode 100644 index 0000000..a0f80fd --- /dev/null +++ b/tests/test_tts.py @@ -0,0 +1,12 @@ +from pathlib import Path +from openai import OpenAI + +# 新版本 opnai +client = OpenAI(api_key="EMPTY", base_url="http://localhost:8082/v1") +speech_file_path = Path(__file__).parent / "speech.mp3" +response = client.audio.speech.create( + model="edge_tts", + voice="zh-CN-YunxiNeural", + input="你好啊,我是人工智能。", +) +response.write_to_file(speech_file_path) diff --git a/uv.lock b/uv.lock index 7314afd..ddfa655 100644 --- a/uv.lock +++ b/uv.lock @@ -1,30 +1,23 @@ version = 1 requires-python = ">=3.10" resolution-markers = [ - "python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", - "python_full_version == '3.11.*' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version == '3.11.*' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", - "python_full_version == '3.12.*' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version == '3.12.*' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version == '3.12.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version == '3.12.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version == '3.12.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version == '3.12.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", - "python_full_version >= '3.13' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version >= '3.13' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version >= '3.13' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version >= '3.13' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "(python_full_version >= '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version >= '3.13' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version >= '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version >= '3.13' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_version < '0'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version < '3.11' and sys_platform == 'emscripten'", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version == '3.11.*' and sys_platform == 'emscripten'", + "python_full_version == '3.12.*' and sys_platform == 'darwin'", + "python_full_version == '3.12.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.12.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version == '3.12.*' and sys_platform == 'emscripten'", + "python_full_version >= '3.13' and sys_platform == 'darwin'", + "python_full_version >= '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version >= '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.13' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version >= '3.13' and sys_platform == 'emscripten'", ] [manifest] @@ -538,11 +531,11 @@ name = "click" version = "8.1.7" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" } +sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", size = 336121 } wheels = [ - { url = "https://pypi.tuna.tsinghua.edu.cn/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28" }, + { url = "https://pypi.tuna.tsinghua.edu.cn/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", size = 97941 }, ] [[package]] @@ -810,6 +803,22 @@ wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277 }, ] +[[package]] +name = "edge-tts" +version = "7.0.0" +source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "certifi" }, + { name = "srt" }, + { name = "tabulate" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/40/4c/887ec101638f89d4f5e4c9c437d1411bcd61070df6a177cd37a93af90c7c/edge_tts-7.0.0.tar.gz", hash = "sha256:bd5db0c05bb7fd973397922f70fc8371c7be2bb4911f9c38bd38c14ed7b52a2d", size = 21061 } +wheels = [ + { url = "https://pypi.tuna.tsinghua.edu.cn/packages/f8/37/00c211f1021f9b04dde72dcbee72ce66248519c3899a47b06f8940a67c08/edge_tts-7.0.0-py3-none-any.whl", hash = "sha256:c99e91caba83c28e6f1fff1098a8188f541ba9615944c7a6f8f5625e02848044", size = 23337 }, +] + [[package]] name = "editdistance" version = "0.8.1" @@ -1167,10 +1176,11 @@ wheels = [ [[package]] name = "gpt-server" -version = "0.3.2" +version = "0.3.5" source = { editable = "." } dependencies = [ { name = "accelerate" }, + { name = "edge-tts" }, { name = "evalscope", extra = ["perf"] }, { name = "fastapi" }, { name = "ffmpy" }, @@ -1193,6 +1203,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "accelerate", specifier = ">=1.0.1" }, + { name = "edge-tts", specifier = ">=7.0.0" }, { name = "evalscope", extras = ["perf"], specifier = "==0.7.0" }, { name = "fastapi", specifier = "==0.114.1" }, { name = "ffmpy" }, @@ -1769,8 +1780,8 @@ dependencies = [ { name = "torch" }, { name = "torchvision" }, { name = "transformers" }, - { name = "triton", version = "2.3.1", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "platform_system == 'Darwin' or (platform_machine == 'aarch64' and platform_system == 'Linux') or python_full_version >= '3.13'" }, - { name = "triton", version = "3.1.0", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version < '3.13' and platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "triton", version = "2.3.1", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version >= '3.13' and platform_machine != 'aarch64') or (python_full_version >= '3.13' and sys_platform != 'linux') or (platform_machine == 'aarch64' and sys_platform == 'linux') or sys_platform == 'darwin'" }, + { name = "triton", version = "3.1.0", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform != 'darwin' and sys_platform != 'linux')" }, { name = "uvicorn" }, ] wheels = [ @@ -2401,7 +2412,7 @@ name = "nvidia-cudnn-cu12" version = "9.1.0.70" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741 }, @@ -2412,7 +2423,7 @@ name = "nvidia-cufft-cu12" version = "11.2.1.3" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/7a/8a/0e728f749baca3fbeffad762738276e5df60851958be7783af121a7221e7/nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:5dad8008fc7f92f5ddfa2101430917ce2ffacd86824914c82e28990ad7f00399", size = 211422548 }, @@ -2434,9 +2445,9 @@ name = "nvidia-cusolver-cu12" version = "11.6.1.9" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, - { name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, - { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, + { name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, + { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/46/6b/a5c33cf16af09166845345275c34ad2190944bcc6026797a39f8e0a282e0/nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:d338f155f174f90724bbde3758b7ac375a70ce8e706d70b018dd3375545fc84e", size = 127634111 }, @@ -2448,7 +2459,7 @@ name = "nvidia-cusparse-cu12" version = "12.3.1.170" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/96/a9/c0d2f83a53d40a4a41be14cea6a0bf9e668ffcf8b004bd65633f433050c0/nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9d32f62896231ebe0480efd8a7f702e143c98cfaa0e8a76df3386c1ba2b54df3", size = 207381987 }, @@ -2919,7 +2930,7 @@ name = "portalocker" version = "3.0.0" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "pywin32", marker = "platform_system == 'Windows'" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/7e/57/b969aed128768558255822e75b402a19530bd63321f637d42f4724abc1ed/portalocker-3.0.0.tar.gz", hash = "sha256:21f535de2e7a82c94c130c054adb5c7421d480d5619d61073996e2f89bcb879b", size = 41961 } wheels = [ @@ -3287,7 +3298,7 @@ name = "pympler" version = "1.1" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "pywin32", marker = "platform_system == 'Windows'" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/dd/37/c384631908029676d8e7213dd956bb686af303a80db7afbc9be36bc49495/pympler-1.1.tar.gz", hash = "sha256:1eaa867cb8992c218430f1708fdaccda53df064144d1c5656b1e6f1ee6000424", size = 179954 } wheels = [ @@ -3326,12 +3337,12 @@ name = "pytest" version = "8.3.4" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "colorama", marker = "(platform_machine != 'aarch64' and sys_platform == 'win32') or (platform_system != 'Linux' and sys_platform == 'win32')" }, - { name = "exceptiongroup", marker = "(python_full_version < '3.11' and platform_machine != 'aarch64') or (python_full_version < '3.11' and platform_system != 'Linux')" }, - { name = "iniconfig", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "packaging", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "pluggy", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "tomli", marker = "(python_full_version < '3.11' and platform_machine != 'aarch64') or (python_full_version < '3.11' and platform_system != 'Linux')" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "(python_full_version < '3.11' and platform_machine != 'aarch64') or (python_full_version < '3.11' and sys_platform != 'linux')" }, + { name = "iniconfig", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "packaging", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "pluggy", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "tomli", marker = "(python_full_version < '3.11' and platform_machine != 'aarch64') or (python_full_version < '3.11' and sys_platform != 'linux')" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 } wheels = [ @@ -4188,6 +4199,12 @@ wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/50/ff/26a4ee48d0b66625a4e4028a055b9f25bc9d7c7b2d17d21a45137621a50d/soundfile-0.12.1-py2.py3-none-win_amd64.whl", hash = "sha256:0d86924c00b62552b650ddd28af426e3ff2d4dc2e9047dae5b3d8452e0a49a77", size = 1009109 }, ] +[[package]] +name = "srt" +version = "3.5.3" +source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } +sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/66/b7/4a1bc231e0681ebf339337b0cd05b91dc6a0d701fa852bb812e244b7a030/srt-3.5.3.tar.gz", hash = "sha256:4884315043a4f0740fd1f878ed6caa376ac06d70e135f306a6dc44632eed0cc0", size = 28296 } + [[package]] name = "sse-starlette" version = "2.1.3" @@ -4237,7 +4254,7 @@ dependencies = [ { name = "toml" }, { name = "tornado" }, { name = "typing-extensions" }, - { name = "watchdog", marker = "platform_system != 'Darwin'" }, + { name = "watchdog", marker = "sys_platform != 'darwin'" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/d5/21/3740871ad79ee35f442f11bafec5010a3ec1916c7c9eb43ef866da641f31/streamlit-1.39.0.tar.gz", hash = "sha256:fef9de7983c4ee65c08e85607d7ffccb56b00482b1041fa62f90e4815d39df3a", size = 8360694 } wheels = [ @@ -4440,22 +4457,22 @@ dependencies = [ { name = "fsspec" }, { name = "jinja2" }, { name = "networkx" }, - { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, - { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, + { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "setuptools" }, { name = "sympy" }, - { name = "triton", version = "2.3.1", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "platform_system == 'Darwin' or (platform_machine == 'aarch64' and platform_system == 'Linux') or python_full_version >= '3.13'" }, - { name = "triton", version = "3.1.0", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version < '3.13' and platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "triton", version = "2.3.1", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version >= '3.13' and platform_machine != 'aarch64') or (python_full_version >= '3.13' and sys_platform != 'linux') or (platform_machine == 'aarch64' and sys_platform == 'linux') or sys_platform == 'darwin'" }, + { name = "triton", version = "3.1.0", source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" }, marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform != 'darwin' and sys_platform != 'linux')" }, { name = "typing-extensions" }, ] wheels = [ @@ -4521,7 +4538,7 @@ name = "tqdm" version = "4.66.5" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz", hash = "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad", size = 169504 } wheels = [ @@ -4563,27 +4580,19 @@ name = "triton" version = "2.3.1" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } resolution-markers = [ - "python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "python_full_version == '3.11.*' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version == '3.11.*' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "python_full_version == '3.12.*' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version == '3.12.*' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version == '3.12.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version == '3.12.*' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "python_full_version >= '3.13' and platform_system == 'Darwin' and sys_platform != 'emscripten'", - "python_full_version >= '3.13' and platform_system == 'Darwin' and sys_platform == 'emscripten'", - "python_full_version >= '3.13' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform != 'emscripten'", - "python_full_version >= '3.13' and platform_machine == 'aarch64' and platform_system == 'Linux' and sys_platform == 'emscripten'", - "(python_full_version >= '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version >= '3.13' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version >= '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version >= '3.13' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.12.*' and sys_platform == 'darwin'", + "python_full_version == '3.12.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.13' and sys_platform == 'darwin'", + "python_full_version >= '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version >= '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.13' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version >= '3.13' and sys_platform == 'emscripten'", ] dependencies = [ - { name = "filelock", marker = "platform_system == 'Darwin' or (platform_machine == 'aarch64' and platform_system == 'Linux') or python_full_version >= '3.13'" }, + { name = "filelock", marker = "(python_full_version >= '3.13' and platform_machine != 'aarch64') or (python_full_version >= '3.13' and sys_platform != 'linux') or (platform_machine == 'aarch64' and sys_platform == 'linux') or sys_platform == 'darwin'" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/d7/69/8a9fde07d2d27a90e16488cdfe9878e985a247b2496a4b5b1a2126042528/triton-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c84595cbe5e546b1b290d2a58b1494df5a2ef066dd890655e5b8a8a92205c33", size = 168055249 }, @@ -4596,15 +4605,15 @@ name = "triton" version = "3.1.0" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } resolution-markers = [ - "(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", - "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", - "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform != 'emscripten') or (python_full_version == '3.12.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'emscripten')", - "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and platform_system != 'Darwin' and sys_platform == 'emscripten') or (python_full_version == '3.12.*' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'emscripten')", + "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version < '3.11' and sys_platform == 'emscripten'", + "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version == '3.11.*' and sys_platform == 'emscripten'", + "(python_full_version == '3.12.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.12.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')", + "python_full_version == '3.12.*' and sys_platform == 'emscripten'", ] dependencies = [ - { name = "filelock", marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version < '3.13' and platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "filelock", marker = "(python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform != 'darwin' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/98/29/69aa56dc0b2eb2602b553881e34243475ea2afd9699be042316842788ff5/triton-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b0dd10a925263abbe9fa37dcde67a5e9b2383fc269fdf59f5657cac38c5d1d8", size = 209460013 }, @@ -4773,7 +4782,7 @@ dependencies = [ { name = "transformers" }, { name = "typing-extensions" }, { name = "uvicorn", extra = ["standard"] }, - { name = "xformers", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" }, + { name = "xformers", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "xgrammar", marker = "platform_machine == 'x86_64'" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/0c/2b/ce6f381d484d7d998f6540f6368c3ebca5452cb5f5be36c48d746f1c0f91/vllm-0.6.5.tar.gz", hash = "sha256:0cafd6b3be45ede8f30b8c6dd70bc584f2d8d5d7e1098c3fdf6f5778237ac5fd", size = 4814359 } @@ -4929,8 +4938,8 @@ name = "xformers" version = "0.0.28.post3" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "numpy", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, - { name = "torch", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "numpy", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, + { name = "torch", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux')" }, ] sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/00/d8/7301b2044e29b384b6ec009ed37002f4df48906a2a772654e8386fa3b730/xformers-0.0.28.post3.tar.gz", hash = "sha256:c7a2392c874dfd8f38b73e14492baf048a4f50f77ddf522bfcf6ebf5ee84d567", size = 7758532 } wheels = [ @@ -4944,11 +4953,11 @@ name = "xgrammar" version = "0.1.7" source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple" } dependencies = [ - { name = "pybind11", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "pydantic", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "pytest", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "torch", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, - { name = "transformers", marker = "platform_machine != 'aarch64' or platform_system != 'Linux'" }, + { name = "pybind11", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "pydantic", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "pytest", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "torch", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, + { name = "transformers", marker = "platform_machine != 'aarch64' or sys_platform != 'linux'" }, ] wheels = [ { url = "https://pypi.tuna.tsinghua.edu.cn/packages/60/7b/95b9d937336a93c3d9af69d8b01e5a0d4d514b16a299ea3ad1b7f48d2302/xgrammar-0.1.7-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6648fe4cadd8146ca7afcce472422195dd2e123e812b14f81934fcce03bcecdc", size = 332343 },