Update Dockerfile

This commit is contained in:
Justin John
2024-01-11 12:58:13 +05:30
committed by GitHub
parent 9159ac1376
commit c9dcf8d167
+28 -22
View File
@@ -1,31 +1,37 @@
# Use ubuntu as the base image from the hub # Use NVIDIA CUDA with Ubuntu as the base image
# then have to build this as a image.
FROM nvidia/cuda:12.2.0-devel-ubuntu20.04 FROM nvidia/cuda:12.2.0-devel-ubuntu20.04
# Optional: Set environment variables
# Set environment variables
ENV MY_ENV_VARIABLE=value ENV MY_ENV_VARIABLE=value
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# Optional: Run commands to set up the image
RUN apt-get update && apt-get install -y curl
# Preconfigure package selections (as an example) # Install necessary packages
RUN echo "package-name package-name/some-option select option-value" | debconf-set-selections && \ RUN apt-get update && apt-get install -y \
apt-get install -y software-properties-common curl \
RUN apt install software-properties-common -y software-properties-common \
RUN add-apt-repository ppa:deadsnakes/ppa git \
RUN apt install python3.10 -y ffmpeg \
RUN apt-get install -y git espeak-ng \
RUN sudo apt install ffmpeg sudo \
RUN sudo apt-get install espeak-ng python3.10 \
# Clone the repository python3-pip
# RUN pwd # Install git-lfs
RUN pip3 install requirements.txt RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get install git-lfs \
&& git lfs install
# Navigate to the cloned directory # Create a directory for your project
WORKDIR TestingDockerIO WORKDIR /TestingDockerIO
COPY StyleTTS2 .
# Copy only the necessary files from the host to the container
COPY StyleTTS2 /TestingDockerIO/StyleTTS2
COPY requirements.txt /TestingDockerIO
# Install Python dependencies
RUN pip3 install --upgrade pip && \
pip3 install -r requirements.txt
# # Allow parameters to be passed # Clone the Git LFS repository and move the Models directory
ENTRYPOINT ["python3", "fakeyou_infer.py"] RUN git lfs clone https://huggingface.co/yl4579/StyleTTS2-LibriTTS && \
mv StyleTTS2-LibriTTS/Models .