Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker/gpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM nvidia/cuda:12.8.1-base-ubuntu24.04
FROM --platform=$BUILDPLATFORM nvcr.io/nvidia/cuda:12.9.1-cudnn-devel-ubuntu24.04

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for switching from base to cuddn-devel?

i.e. why not cuda:12.9.1-base-ubuntu24.04?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there is an incompatibility between Spacy and CMAKE libraries configuration on the base image:

180.2  Downloading spacy
181.4   × Failed to build `pyopenjtalk==0.4.1`
181.4   ├─▶ The build backend returned an error
181.4   ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
181.4 
181.4       [stdout]
181.4       -- Configuring incomplete, errors occurred!
181.4 
181.4       [stderr]
181.4       CMake Error: CMake was unable to find a build program corresponding to
181.4       "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
181.4       select a different build tool.
181.4       CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
181.4       CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
181.4       Traceback (most recent call last):
181.4         File "<string>", line 14, in <module>
181.4         File
181.4       "/tmp/.tmpTbGGdY/builds-v0/.tmpobis9A/lib/python3.10/site-packages/setuptools/build_meta.py",
181.4       line 331, in get_requires_for_build_wheel
181.4           return self._get_build_requires(config_settings, requirements=[])
181.4         File
181.4       "/tmp/.tmpTbGGdY/builds-v0/.tmpobis9A/lib/python3.10/site-packages/setuptools/build_meta.py",
181.4       line 301, in _get_build_requires
181.4           self.run_setup()
181.4         File
181.4       "/tmp/.tmpTbGGdY/builds-v0/.tmpobis9A/lib/python3.10/site-packages/setuptools/build_meta.py",
181.4       line 317, in run_setup
181.4           exec(code, locals())
181.4         File "<string>", line 105, in <module>
181.4         File
181.4       "/home/appuser/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/subprocess.py",
181.4       line 457, in check_returncode
181.4           raise CalledProcessError(self.returncode, self.args, self.stdout,
181.4       subprocess.CalledProcessError: Command '['cmake', '..']' returned
181.4       non-zero exit status 1.
181.4 
181.4       hint: This usually indicates a problem with the package or the build
181.4       environment.
181.4   help: `pyopenjtalk` (v0.4.1) was included because `kokoro-fastapi` (v0.3.0)
181.4         depends on `misaki[ja]` (v0.9.4) which depends on `pyopenjtalk`


# Install Python and other dependencies
RUN apt-get update -y && \
Expand All @@ -12,7 +12,7 @@ RUN apt-get update -y && \
useradd -m -u 1001 appuser && \
mkdir -p /app/api/src/models/v1_0 && \
chown -R appuser:appuser /app

USER appuser
WORKDIR /app

Expand Down Expand Up @@ -40,7 +40,7 @@ ENV PATH="/app/.venv/bin:$PATH" \
PHONEMIZER_ESPEAK_DATA=/usr/share/espeak-ng-data \
ESPEAK_DATA_PATH=/usr/share/espeak-ng-data \
DEVICE="gpu"

ENV DOWNLOAD_MODEL=true
# Download model if enabled
RUN if [ "$DOWNLOAD_MODEL" = "true" ]; then \
Expand Down
29 changes: 10 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dependencies = [
"mutagen>=1.47.0",
"psutil>=6.1.1",
"espeakng-loader==0.2.4",
"kokoro==0.9.2",
"misaki[en,ja,ko,zh]==0.9.3",
"kokoro==0.9.4",
"misaki[en,ja,ko,zh]==0.9.4",
"spacy==3.8.5",
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl",
"inflect>=7.5.0",
Expand All @@ -43,28 +43,19 @@ dependencies = [
]

[project.optional-dependencies]
gpu = [
"torch==2.7.1+cu128",
]
cpu = [
"torch==2.7.1",
]
gpu = ["torch==2.8.0+cu129"]
cpu = ["torch==2.8.0"]
test = [
"pytest==8.3.5",
"pytest-cov==6.0.0",
"httpx==0.26.0",
"pytest-asyncio==0.25.3",
"tomli>=2.0.1",
"jinja2>=3.1.6"
"jinja2>=3.1.6",
]

[tool.uv]
conflicts = [
[
{ extra = "cpu" },
{ extra = "gpu" },
],
]
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]

[tool.uv.sources]
torch = [
Expand All @@ -79,19 +70,19 @@ explicit = true

[[tool.uv.index]]
name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu128"
url = "https://download.pytorch.org/whl/cu129"
explicit = true

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
package-dir = {"" = "api/src"}
packages.find = {where = ["api/src"], namespaces = true}
package-dir = { "" = "api/src" }
packages.find = { where = ["api/src"], namespaces = true }

[tool.pytest.ini_options]
testpaths = ["api/tests", "ui/tests"]
python_files = ["test_*.py"]
addopts = "--cov=api --cov=ui --cov-report=term-missing --cov-config=.coveragerc --full-trace"
addopts = "--cov=api --cov=ui --cov-report=term-missing --cov-config=.coveragerc --full-trace"
asyncio_mode = "auto"