-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile with uv. You can test with:
docker build . -t coqui mkdir output docker run -it -v ./output:/app/output coqui --text "Text for TTS" --out_path output/speech.wav
- Loading branch information
1 parent
dbf1a08
commit 3515c24
Showing
3 changed files
with
2,347 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
ARG BASE=nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
FROM ${BASE} | ||
FROM ${BASE} AS builder | ||
|
||
RUN apt-get update && apt-get upgrade -y | ||
RUN apt-get install -y --no-install-recommends gcc g++ make python3 python3-dev python3-pip python3-venv python3-wheel espeak-ng libsndfile1-dev && rm -rf /var/lib/apt/lists/* | ||
RUN pip3 install llvmlite --ignore-installed | ||
WORKDIR /app | ||
RUN apt update && apt upgrade -y && apt install -y curl build-essential libsndfile1-dev | ||
|
||
# Install Dependencies: | ||
RUN pip3 install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 | ||
RUN rm -rf /root/.cache/pip | ||
# Install rustup | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# Copy TTS repository contents: | ||
WORKDIR /root | ||
COPY . /root | ||
# Install uv | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv | ||
|
||
RUN make install | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
--mount=type=bind,source=uv.lock,target=uv.lock \ | ||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
uv sync --frozen --no-install-project --no-dev | ||
COPY . /app | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv sync --frozen --no-dev | ||
ENV PATH="/app/.venv/bin:$PATH" | ||
|
||
ENTRYPOINT ["tts"] | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.