Skip to content

Commit

Permalink
convert dockerfile to uv install
Browse files Browse the repository at this point in the history
  • Loading branch information
rsxdalv committed Oct 7, 2024
1 parent 94ffe52 commit f4e6071
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['main']
branches: ['installation-upgrades'] # temporary

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand Down
39 changes: 19 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN node --version
RUN npm --version

# Setup venv
RUN pip3 install --no-cache-dir virtualenv
RUN virtualenv /venv
ENV VIRTUAL_ENV=/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install uv
ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
RUN /install.sh && rm /install.sh

# Define PyTorch version
ENV TORCH_VERSION=2.3.1

# Version 24 is broken due to fairseq
RUN pip3 install --no-cache-dir --upgrade pip==23.3.2 setuptools && \
pip3 install --no-cache-dir torch==$TORCH_VERSION torchvision torchaudio
ENV PATH="/root/.cargo/bin:$PATH"
RUN uv pip install --no-cache-dir setuptools torch==$TORCH_VERSION torchvision torchaudio

# Set working directory
WORKDIR /app
Expand All @@ -40,18 +37,20 @@ RUN git clone https://github.com/rsxdalv/tts-generation-webui.git
WORKDIR /app/tts-generation-webui

# Install all requirements
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_bark_hubert_quantizer.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_rvc.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft_0.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_styletts2.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_vall_e.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_maha_tts.txt
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements_stable_audio.txt
# RUN pip3 install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py

RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_bark_hubert_quantizer.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_rvc.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft_0.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_styletts2.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_vall_e.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_maha_tts.txt
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_stable_audio.txt
# RUN uv pip install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
RUN uv pip install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py


# add postgres & run setup
# Build the React UI
RUN cd react-ui && npm install && npm run build

Expand Down

0 comments on commit f4e6071

Please sign in to comment.