-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing Development Dockerfile (#3263)
* Moved Dockerfile, COPY at the end This change should prevent re-installation of the dependencies upon every change of the repository's contents. Typically if Docker detects that something changed in a layer, all downstream layers are invalidated and rebuilt. * Moved Dockerfile back to main directory Main dockerfile in a separate directory can cause issues with the current CI/CD setup. This can be a good change for later. * Introduced Dockerfile.dev, updated CONTRIBUTING Dockerfile.dev can be used as a separate development environment for anyone that does not wish to install the dependencies locally.
- Loading branch information
Showing
3 changed files
with
78 additions
and
2 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
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,13 +1,19 @@ | ||
ARG BASE=nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
FROM ${BASE} | ||
|
||
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 /root | ||
COPY . /root | ||
# Install Dependencies: | ||
RUN pip3 install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 | ||
RUN rm -rf /root/.cache/pip | ||
|
||
# Copy TTS repository contents: | ||
WORKDIR /root | ||
COPY . /root | ||
|
||
RUN make install | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
ARG BASE=nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
FROM ${BASE} | ||
|
||
# Install OS dependencies: | ||
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/* | ||
|
||
# Install Major Python Dependencies: | ||
RUN pip3 install llvmlite --ignore-installed | ||
RUN pip3 install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 | ||
RUN rm -rf /root/.cache/pip | ||
|
||
WORKDIR /root | ||
|
||
# Copy Dependency Lock Files: | ||
COPY \ | ||
Makefile \ | ||
pyproject.toml \ | ||
setup.py \ | ||
requirements.dev.txt \ | ||
requirements.ja.txt \ | ||
requirements.notebooks.txt \ | ||
requirements.txt \ | ||
/root/ | ||
|
||
# Install Project Dependencies | ||
# Separate stage to limit re-downloading: | ||
RUN pip install \ | ||
-r requirements.txt \ | ||
-r requirements.dev.txt \ | ||
-r requirements.ja.txt \ | ||
-r requirements.notebooks.txt | ||
|
||
# Copy TTS repository contents: | ||
COPY . /root | ||
|
||
# Installing the TTS package itself: | ||
RUN make install | ||
|