VoiceCraft / Dockerfile
beowcow's picture
Create Dockerfile
710b20f verified
FROM nvidia/cuda:11.7.1-base-ubuntu22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 libcairo2-dev pkg-config python3-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /
USER root
RUN export USER=root
RUN export HOME=/home/$USER
RUN pip3 install --upgrade pip
RUN pip install xformers==0.0.16
RUN pip install triton==2.0.0
RUN pip install numexpr
RUN git clone https://github.com/jasonppy/VoiceCraft
RUN cd VoiceCraft
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
ca-certificates \
libglib2.0-0 \
libxext6 \
libsm6 \
libxrender1 \
git \
mercurial \
subversion
# Download and install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
chmod +x miniconda.sh && \
./miniconda.sh -b -p /opt/conda && \
rm miniconda.sh
# Add Miniconda to the PATH
ENV PATH=/opt/conda/bin:$PATH
# Update Conda and create a new environment
RUN conda update -y -n base -c conda-forge conda && \
conda create -y -n voicecraft python=3.9.16 && \
conda init bash
# Set up the Conda environment and install packages
RUN /bin/bash -c "source ~/.bashrc && \
conda activate voicecraft && \
conda install -y -c conda-forge montreal-forced-aligner=2.2.17 openfst=1.8.2 kaldi=5.5.1068 && \
pip install torch==2.0.1 tensorboard==2.16.2 phonemizer==3.2.1 torchaudio==2.0.2 datasets==2.16.0 torchmetrics==0.11.1 && \
pip install -e git+https://github.com/facebookresearch/audiocraft.git@c5157b5bf14bf83449c17ea1eeb66c19fb4bc7f0#egg=audiocraft && \
conda install -y -n voicecraft ipykernel --update-deps --force-reinstall && \
python3 -m ipykernel install --user --name=voicecraft && \
mfa model download dictionary english_us_arpa && \
mfa model download acoustic english_us_arpa"
# Set the default command to start a Jupyter notebook
CMD ["/bin/bash", "-c", "source ~/.bashrc && conda activate voicecraft && jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root"]
# Expose the Jupyter notebook port
EXPOSE 8888