Skip to content

Commit

Permalink
deps: move ui packages to a separate group
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi authored and fedirz committed Sep 30, 2024
1 parent ecbd5b8 commit 1af5898
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
version: "0.4.11"
enable-cache: true
- run: uv python install 3.12
- run: uv sync --extra dev
- run: uv sync --all-extras
# TODO: figure out why `pytest` doesn't discover tests in `faster_whisper_server` directory by itself
- run: uv run pytest -m "not requires_openai" src/faster_whisper_server/* tests
2 changes: 1 addition & 1 deletion Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project
COPY ./src ./pyproject.toml ./uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen
uv sync --frozen --extra ui
ENV WHISPER__MODEL=Systran/faster-whisper-small
ENV WHISPER__INFERENCE_DEVICE=cpu
ENV UVICORN_HOST=0.0.0.0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project
COPY ./src ./pyproject.toml ./uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen
uv sync --frozen --extra ui
ENV WHISPER__MODEL=Systran/faster-whisper-large-v3
ENV WHISPER__INFERENCE_DEVICE=auto
ENV UVICORN_HOST=0.0.0.0
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ requires-python = ">=3.12,<3.13"
dependencies = [
"fastapi>=0.115.0",
"faster-whisper>=1.0.3",
"gradio>=4.44.0",
"httpx-sse>=0.4.0",
"httpx>=0.27.2",
"huggingface-hub>=0.25.1",
"numpy>=2.1.1",
"openai>=1.48.0",
"pydantic-settings>=2.5.2",
"pydantic>=2.9.0",
"python-multipart>=0.0.10",
Expand All @@ -23,6 +19,7 @@ dependencies = [
client = [
"keyboard>=0.13.5",
]
# NOTE: when installing `dev` group, all other groups should also be installed
dev = [
"anyio>=4.4.0",
"basedpyright>=1.18.0",
Expand All @@ -33,6 +30,12 @@ dev = [
"srt>=3.5.3",
"webvtt-py>=0.5.1",
]
ui = [
"gradio>=4.44.0",
"httpx>=0.27.2",
"httpx-sse>=0.4.0",
"openai>=1.48.0",
]

[build-system]
requires = ["hatchling"]
Expand Down
Loading

0 comments on commit 1af5898

Please sign in to comment.