From 4004aab6441fa5f9c68247a6c820b1b1d0a8a588 Mon Sep 17 00:00:00 2001 From: Kasisnu <5044120+kasisnu@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:04:54 +0530 Subject: [PATCH] minor updates to match file layout expected by inference runner --- tts/StyleTTS2/Dockerfile | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tts/StyleTTS2/Dockerfile b/tts/StyleTTS2/Dockerfile index 7e9cb95..dd441ad 100644 --- a/tts/StyleTTS2/Dockerfile +++ b/tts/StyleTTS2/Dockerfile @@ -5,6 +5,12 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu20.04 ENV MY_ENV_VARIABLE=value ENV DEBIAN_FRONTEND=noninteractive +RUN mkdir /python_install +RUN mkdir /model_code + +WORKDIR /python_install + + # Install necessary packages RUN apt-get update && apt-get install -y \ curl \ @@ -12,27 +18,33 @@ RUN apt-get update && apt-get install -y \ git \ ffmpeg \ espeak-ng \ - sudo \ - python3.10 \ - python3-pip + sudo # Install git-lfs RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ && apt-get install git-lfs \ && git lfs install +# rsync to copy between pods with rich logs +RUN apt-get install -y rsync -# Create a directory for our project -WORKDIR /TestingDockerIO +RUN add-apt-repository ppa:deadsnakes/ppa -# Copy only the necessary files from the host to the container -COPY StyleTTS2 /TestingDockerIO/StyleTTS2 +RUN apt-get update +RUN apt-get install -y python3.8 python3.8-venv python3.8-dev python3.8-full python3.8-distutils + +COPY requirements.txt . +# Install Python dependencies +RUN python3.8 -m venv python \ + && python/bin/pip install --upgrade pip wheel setuptools \ + && . python/bin/activate \ + && pip install -r requirements.txt # Change working directory to StyleTTS2 -WORKDIR /TestingDockerIO/StyleTTS2 +WORKDIR /model_code + +# Copy only the necessary files from the host to the container +COPY . . -# Install Python dependencies -RUN pip3 install --upgrade pip && \ - pip3 install -r requirements.txt # Clone the Git LFS repository and move the Models directory RUN git lfs clone https://huggingface.co/yl4579/StyleTTS2-LibriTTS && \