|
|
|
FROM python:3.10
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 5050
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get -y install git \
|
|
curl \
|
|
autoconf \
|
|
bison \
|
|
build-essential \
|
|
libssl-dev \
|
|
libyaml-dev \
|
|
libreadline6-dev \
|
|
zlib1g-dev \
|
|
libncurses5-dev \
|
|
libffi-dev \
|
|
libgdbm6 \
|
|
libgdbm-dev \
|
|
libdb-dev \
|
|
apt-utils
|
|
|
|
|
|
|
|
|
|
|
|
ENV RBENV_ROOT /usr/local/src/rbenv
|
|
ENV RUBY_VERSION 3.1.2
|
|
ENV PATH ${RBENV_ROOT}/bin:${RBENV_ROOT}/shims:$PATH
|
|
|
|
|
|
|
|
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} \
|
|
&& git clone https://github.com/rbenv/ruby-build.git \
|
|
${RBENV_ROOT}/plugins/ruby-build \
|
|
&& ${RBENV_ROOT}/plugins/ruby-build/install.sh \
|
|
&& echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
|
|
|
|
|
|
|
|
RUN rbenv install ${RUBY_VERSION} \
|
|
&& rbenv global ${RUBY_VERSION}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN gem install jekyll -v '3.9.3'
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y sudo && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python -m venv .env && \
|
|
. .env/bin/activate && \
|
|
git submodule update --init --recursive && \
|
|
cd TTS && \
|
|
git fetch --tags && \
|
|
git checkout 0.1.1 && \
|
|
echo "Installing TTS..." && \
|
|
pip install --use-deprecated=legacy-resolver -e . -q && \
|
|
cd .. && \
|
|
echo "Installing other requirements..." && \
|
|
pip install -r requirements.txt -q && \
|
|
echo "Downloading Japanese/Chinese tokenizer..." && \
|
|
python -m unidic download && \
|
|
pip install --upgrade gradio && \
|
|
touch .env/ok
|
|
|
|
|
|
CMD ["/bin/bash"] |