Dockerfile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Python 3.10 w/ Nvidia Cuda
  2. FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS env_base
  3. # Install Pre-reqs
  4. RUN apt-get update && apt-get install --no-install-recommends -y \
  5. git vim nano build-essential python3-dev python3-venv python3-pip gcc g++ ffmpeg
  6. ENV NODE_VERSION=22.9.0
  7. RUN apt-get update && apt install -y curl
  8. RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  9. ENV NVM_DIR=/root/.nvm
  10. RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
  11. RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
  12. RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
  13. ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
  14. RUN node --version
  15. RUN npm --version
  16. # Install uv
  17. # ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
  18. # RUN /install.sh && rm /install.sh
  19. # Define PyTorch version
  20. ENV TORCH_VERSION=2.3.1
  21. ENV PATH="/root/.cargo/bin:$PATH"
  22. RUN pip install --no-cache-dir setuptools torch==$TORCH_VERSION torchvision torchaudio
  23. # Set working directory
  24. WORKDIR /app
  25. # Clone the repo
  26. RUN git clone https://github.com/rsxdalv/tts-generation-webui.git
  27. # Set working directory to the cloned repo
  28. WORKDIR /app/tts-generation-webui
  29. RUN pip3 install --no-cache-dir --upgrade pip==23.3.2 setuptools
  30. # Install all requirements
  31. RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements.txt
  32. # RUN pip install --no-cache-dir --verbose torch==$TORCH_VERSION -r requirements.txt
  33. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_bark_hubert_quantizer.txt
  34. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_rvc.txt
  35. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft.txt
  36. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_styletts2.txt
  37. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_vall_e.txt
  38. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_maha_tts.txt
  39. RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_stable_audio.txt
  40. # RUN pip install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
  41. RUN pip install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py
  42. # add postgres & run setup
  43. # Build the React UI
  44. RUN cd react-ui && npm install && npm run build
  45. # Run the server
  46. CMD python3 server.py --docker