|
|
|
FROM python:3.8-slim |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
build-essential \ |
|
wget \ |
|
git \ |
|
libsndfile1 \ |
|
cmake \ |
|
libatlas-base-dev \ |
|
libtool \ |
|
automake \ |
|
autoconf \ |
|
sox \ |
|
ffmpeg \ |
|
|
|
mecab \ |
|
libmecab-dev \ |
|
mecab-ipadic-utf8 \ |
|
|
|
zlib1g-dev \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN mkdir -p /tmp/open_jtalk && \ |
|
cd /tmp/open_jtalk && \ |
|
wget -O open_jtalk.tar.gz "https://sourceforge.net/projects/open-jtalk/files/Open%20JTalk/open_jtalk-1.11/open_jtalk-1.11.tar.gz/download" && \ |
|
tar xzf open_jtalk.tar.gz && \ |
|
cd open_jtalk-1.11 && \ |
|
./configure --with-charset=utf8 && \ |
|
make && \ |
|
make install && \ |
|
ldconfig |
|
|
|
|
|
ENV LD_LIBRARY_PATH=/usr/local/lib |
|
ENV PATH="/usr/local/bin:${PATH}" |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN git clone https://github.com/EXACG/AI-Sound-Web.git /app |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN pip install --no-cache-dir \ |
|
uvicorn \ |
|
fastapi \ |
|
librosa \ |
|
soundfile \ |
|
unidecode \ |
|
phonemizer \ |
|
pypinyin \ |
|
pypinyin_dict \ |
|
jieba \ |
|
Cython |
|
|
|
|
|
RUN pip install --no-cache-dir pyopenjtalk |
|
|
|
|
|
RUN mkdir -p /app/ys && \ |
|
wget -c "https://github.com/LemonFan-maker/Download-Models/releases/download/ys/ys.pth" -P /app/ys |
|
|
|
|
|
RUN cd /app/monotonic_align/ && python setup.py build_ext --inplace |
|
|
|
|
|
EXPOSE 8080 |
|
|
|
|
|
CMD ["python", "main.py"] |