From adc8432f091a2b5e727463287b38f5b6b5080d14 Mon Sep 17 00:00:00 2001 From: Benedikt Wagener Date: Sun, 2 Feb 2025 06:19:34 +0100 Subject: [PATCH] remove multistage.Dockerfile --- multistage.Dockerfile | 49 ------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 multistage.Dockerfile diff --git a/multistage.Dockerfile b/multistage.Dockerfile deleted file mode 100644 index 191db25..0000000 --- a/multistage.Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM nvidia/cuda:12.6.3-runtime-ubuntu22.04 AS base - -# note: the python3-pip package contains Python 3.10 on Ubuntu 22.04 -RUN apt-get update \ - && apt-get install python3 ffmpeg -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -FROM base AS dependencies - -# note: the python3-pip package contains Python 3.10 on Ubuntu 22.04 -RUN apt-get update \ - && apt-get install git python3-pip python3.10-venv ffmpeg -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# copy only the requirements file to leverage container image build cache -COPY ./requirements.txt /app/UltraSinger/requirements.txt -WORKDIR /app/UltraSinger - -# no need to run as root -RUN chown -R 1000:1000 /app/UltraSinger -USER 1000:1000 - -# setup venv -ENV VIRTUAL_ENV=/app/UltraSinger/.venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -# install dependencies -RUN pip install --no-cache-dir -r requirements.txt \ - && pip install --no-cache-dir torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121 \ - && pip install --no-cache-dir tensorflow[and-cuda]==2.16.1 - -# create runtime image with minimal dependencies -FROM base AS runtime - -USER 1000:1000 - -COPY --from=dependencies --chown=1000:1000 /app/UltraSinger/ /app/UltraSinger/ - -# setup venv -ENV VIRTUAL_ENV=/app/UltraSinger/.venv -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -# copy sources late to allow for caching of layers which contain all the dependencies -COPY . /app/UltraSinger -WORKDIR /app/UltraSinger/src -CMD ["bash" ]