File size: 2,867 Bytes
33acd27 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# Use an official Ubuntu base image
FROM python:3.10
# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Update package list and install necessary packages including Python 3.10
# Create a working directory
WORKDIR /app
EXPOSE 5050
# Copy all files from the current directory to the /app directory in the container
COPY . .
# docker run -it -p 5052:5052 akthangdz/tts1:latest /bin/bash -c "source .env/bin/activate && pip install --upgrade gradio && python vixtts_demo.py" --gpus all -t nvidia/cuda
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
# "#################################################"
# "GitHub Pages/Jekyll is based on Ruby. Set the version and path"
# "As of this writing, use Ruby 3.1.2
# "Based on: https://talk.jekyllrb.com/t/liquid-4-0-3-tainted/7946/12"
ENV RBENV_ROOT /usr/local/src/rbenv
ENV RUBY_VERSION 3.1.2
ENV PATH ${RBENV_ROOT}/bin:${RBENV_ROOT}/shims:$PATH
# "#################################################"
# "Install rbenv to manage Ruby versions"
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
# "#################################################"
# "Install ruby and set the global version"
RUN rbenv install ${RUBY_VERSION} \
&& rbenv global ${RUBY_VERSION}
# "#################################################"
# "Install the version of Jekyll that GitHub Pages supports"
# "Based on: https://pages.github.com/versions/"
# "Note: If you always want the latest 3.9.x version,"
# " use this line instead:"
# " RUN gem install jekyll -v '~>3.9'"
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
# Set the default command to run when starting the container
CMD ["/bin/bash"] |