FROM docker.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04@sha256:cf67d5cc154877ae9eca65df59b # existing instructions RUN --mount=target=/root/packages.txt,source=packages.txt apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* RUN curl https://pyenv.run | bash RUN --mount=target=pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r pre-requirements.txt RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt RUN useradd -m -u 1000 user RUN pyenv install 3.10 && pyenv global 3.10 && pyenv rehash && pip install --no-cache-dir --upgrade pip==22.3.1 setuptools wheel && pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1" "pydantic~=1.0" WORKDIR /home/user/app RUN apt-get update && apt-get install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install RUN pip install --no-cache-dir gradio==3.39.0 COPY --link --chown=1000 --from=lfs /app /home/user/app # Copy ffmpeg file from local system into the docker image COPY ffmpeg / # Give execution permissions for the ffmpeg file RUN chmod +x /ffmpeg COPY --link --chown=1000 ./ /home/user/app