Merge pull request #620 from Paladinium/docker_cuda_12_8
Docker: Updating to CUDA 12.8, pytorch 2.7 and DeepSpeed 0.17.2
This commit is contained in:
6 files changed
+22
-25
No files matched your search
+7
-2
@@ -3,7 +3,7 @@ The Docker image currently works on Windows and Linux supporting NVIDIA GPUs.
|
|||||||
|
|
||||||
## System requirements
|
## System requirements
|
||||||
- AMD compatible Windows or Linux system
|
- AMD compatible Windows or Linux system
|
||||||
- CUDA 12.6
|
- CUDA 12.8
|
||||||
- Nvidia Docker Container Toolkit
|
- Nvidia Docker Container Toolkit
|
||||||
- At least 25GB of free disk space
|
- At least 25GB of free disk space
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ visit `http://localhost:7851/`. See instructions below for passing more argument
|
|||||||
4. Download CUDA toolkit keyring: `wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb`
|
4. Download CUDA toolkit keyring: `wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb`
|
||||||
5. Install keyring: `sudo dpkg -i cuda-keyring_1.1-1_all.deb`
|
5. Install keyring: `sudo dpkg -i cuda-keyring_1.1-1_all.deb`
|
||||||
6. Update package list: `sudo apt-get update`
|
6. Update package list: `sudo apt-get update`
|
||||||
7. Install CUDA toolkit: `sudo apt-get -y install cuda-toolkit-12-6`
|
7. Install CUDA toolkit: `sudo apt-get -y install cuda-toolkit-12-8`
|
||||||
8. Install Docker Desktop using WSL2 as the backend
|
8. Install Docker Desktop using WSL2 as the backend
|
||||||
9. Restart
|
9. Restart
|
||||||
10. If you wish to monitor the terminal remotely via SSH, follow [this guide](https://www.hanselman.com/blog/how-to-ssh-into-wsl2-on-windows-10-from-an-external-machine).
|
10. If you wish to monitor the terminal remotely via SSH, follow [this guide](https://www.hanselman.com/blog/how-to-ssh-into-wsl2-on-windows-10-from-an-external-machine).
|
||||||
@@ -108,3 +108,8 @@ reason, you may want to use `docker-build.sh` with the following arguments:
|
|||||||
- Example: `docker-build.sh --clean`
|
- Example: `docker-build.sh --clean`
|
||||||
|
|
||||||
|
|
||||||
|
# Older images
|
||||||
|
- CUDA 12.6:
|
||||||
|
- XTTS Dockerhub hash: sha256:fd4741714af0c82e4e7a66bf9ae47c98f3e51ebefdb3af5795b47d41ca5fb159
|
||||||
|
- VITS Dockerhub hash: sha256:9f411e8fdb997486bc217fcd316bf6b163c39736655ea3400028ad4fcc5c60f9
|
||||||
|
- Piper: Dockerhub hash: sha256:6ae2520051bb00a0356dc4ed80a33bf6784cb567b59759af46046ddcf356b765
|
||||||
+2
-2
@@ -6,7 +6,7 @@ FROM ${DOCKER_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG}
|
|||||||
ARG TTS_MODEL="xtts"
|
ARG TTS_MODEL="xtts"
|
||||||
ENV TTS_MODEL=$TTS_MODEL
|
ENV TTS_MODEL=$TTS_MODEL
|
||||||
|
|
||||||
ARG DEEPSPEED_VERSION=0.16.2
|
ARG DEEPSPEED_VERSION=0.17.2
|
||||||
ENV DEEPSPEED_VERSION=$DEEPSPEED_VERSION
|
ENV DEEPSPEED_VERSION=$DEEPSPEED_VERSION
|
||||||
|
|
||||||
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
||||||
@@ -94,7 +94,7 @@ RUN <<EOR
|
|||||||
# Download DeepSpeed wheel if it was not built locally:
|
# Download DeepSpeed wheel if it was not built locally:
|
||||||
if [ -z "${DEEPSPEED_WHEEL}" ] || [ ! -f $DEEPSPEED_WHEEL ] ; then
|
if [ -z "${DEEPSPEED_WHEEL}" ] || [ ! -f $DEEPSPEED_WHEEL ] ; then
|
||||||
echo "Downloading pre-built DeepSpeed wheel"
|
echo "Downloading pre-built DeepSpeed wheel"
|
||||||
CURL_ERROR=$( { curl --output-dir /tmp/deepspeed -fLO "https://github.com/erew123/alltalk_tts/releases/download/DeepSpeed-for-docker/deepspeed-0.16.2+b344c04d-cp311-cp311-linux_x86_64.whl" ; } 2>&1 )
|
CURL_ERROR=$( { curl --output-dir /tmp/deepspeed -fLO "https://github.com/erew123/alltalk_tts/releases/download/DeepSpeed-for-docker/deepspeed-0.17.2+15f054d9-cp311-cp311-linux_x86_64.whl" ; } 2>&1 )
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Failed to download DeepSpeed: $CURL_ERROR"
|
echo "Failed to download DeepSpeed: $CURL_ERROR"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM continuumio/miniconda3:24.7.1-0 AS build
|
FROM continuumio/miniconda3:24.7.1-0 AS build
|
||||||
|
|
||||||
ARG CUDA_VERSION=12.6.0
|
ARG CUDA_VERSION=12.8.1
|
||||||
ENV CUDA_VERSION=$CUDA_VERSION
|
ENV CUDA_VERSION=$CUDA_VERSION
|
||||||
|
|
||||||
ARG PYTHON_VERSION=3.11.11
|
ARG PYTHON_VERSION=3.11.11
|
||||||
@@ -53,7 +53,8 @@ RUN <<EOR
|
|||||||
cuda-command-line-tools=${CUDA_VERSION} cuda-compiler=${CUDA_VERSION} cuda-runtime=${CUDA_VERSION} \
|
cuda-command-line-tools=${CUDA_VERSION} cuda-compiler=${CUDA_VERSION} cuda-runtime=${CUDA_VERSION} \
|
||||||
cuda-libraries=${CUDA_VERSION} cuda-libraries-dev=${CUDA_VERSION} cuda-libraries-static=${CUDA_VERSION} \
|
cuda-libraries=${CUDA_VERSION} cuda-libraries-dev=${CUDA_VERSION} cuda-libraries-static=${CUDA_VERSION} \
|
||||||
cuda-cudart=${CUDA_SHORT_VERSION} cuda-cudart_linux-64=${CUDA_SHORT_VERSION} \
|
cuda-cudart=${CUDA_SHORT_VERSION} cuda-cudart_linux-64=${CUDA_SHORT_VERSION} \
|
||||||
cudnn=9.3 \
|
conda-forge::nccl=2.27.5.1 \
|
||||||
|
cudnn=9.10 \
|
||||||
py-cpuinfo=9 \
|
py-cpuinfo=9 \
|
||||||
conda-forge::ffmpeg=7.1.0 \
|
conda-forge::ffmpeg=7.1.0 \
|
||||||
conda-forge::portaudio=19.7.0 \
|
conda-forge::portaudio=19.7.0 \
|
||||||
@@ -76,7 +77,7 @@ RUN <<EOR
|
|||||||
conda activate alltalk
|
conda activate alltalk
|
||||||
mkdir -p ${ALLTALK_DIR}/pip_cache
|
mkdir -p ${ALLTALK_DIR}/pip_cache
|
||||||
pip install --no-cache-dir --cache-dir=${ALLTALK_DIR}/pip_cache \
|
pip install --no-cache-dir --cache-dir=${ALLTALK_DIR}/pip_cache \
|
||||||
torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu${CUDA_SHORT_VERSION_NO_DOT}
|
torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu${CUDA_SHORT_VERSION_NO_DOT}
|
||||||
|
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Failed to install pip dependencies: $RESULT"
|
echo "Failed to install pip dependencies: $RESULT"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ ARG DOCKER_REPOSITORY
|
|||||||
ARG DOCKER_TAG=latest
|
ARG DOCKER_TAG=latest
|
||||||
FROM ${DOCKER_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG}
|
FROM ${DOCKER_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG}
|
||||||
|
|
||||||
ARG DEEPSPEED_VERSION=0.16.3
|
ARG DEEPSPEED_VERSION=0.17.2
|
||||||
ENV DEEPSPEED_VERSION=$DEEPSPEED_VERSION
|
ENV DEEPSPEED_VERSION=$DEEPSPEED_VERSION
|
||||||
|
|
||||||
WORKDIR ${ALLTALK_DIR}
|
WORKDIR ${ALLTALK_DIR}
|
||||||
@@ -27,15 +27,6 @@ RUN <<EOR
|
|||||||
cd ${ALLTALK_DIR}/DeepSpeed
|
cd ${ALLTALK_DIR}/DeepSpeed
|
||||||
git checkout .
|
git checkout .
|
||||||
git checkout "tags/v${DEEPSPEED_VERSION}" -b "v${DEEPSPEED_VERSION}"
|
git checkout "tags/v${DEEPSPEED_VERSION}" -b "v${DEEPSPEED_VERSION}"
|
||||||
|
|
||||||
# Patching some files due to bug https://github.com/microsoft/DeepSpeed/issues/6709
|
|
||||||
START_LINE=`awk '/#ifndef BF16_AVAILABLE/{ print NR; exit }' csrc/transformer/inference/csrc/gelu.cu`
|
|
||||||
TO_LINE=$((START_LINE + 2))
|
|
||||||
sed -i "${START_LINE},${TO_LINE}d" ./csrc/transformer/inference/csrc/gelu.cu
|
|
||||||
|
|
||||||
START_LINE=`awk '/#ifndef BF16_AVAILABLE/{ print NR; exit }' csrc/transformer/inference/csrc/transform.cu`
|
|
||||||
TO_LINE=$((START_LINE + 2))
|
|
||||||
sed -i "${START_LINE},${TO_LINE}d" ./csrc/transformer/inference/csrc/transform.cu
|
|
||||||
EOR
|
EOR
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
declare -A ALLTALK_VARS
|
declare -A ALLTALK_VARS
|
||||||
ALLTALK_VARS["CUDA_VERSION"]=12.6.0
|
ALLTALK_VARS["CUDA_VERSION"]=12.8.1
|
||||||
ALLTALK_VARS["PYTHON_VERSION"]=3.11.11
|
ALLTALK_VARS["PYTHON_VERSION"]=3.11.11
|
||||||
ALLTALK_VARS["DEEPSPEED_VERSION"]=0.16.2
|
ALLTALK_VARS["DEEPSPEED_VERSION"]=0.17.2
|
||||||
|
|
||||||
# Export single variables (needed by Docker locally)
|
# Export single variables (needed by Docker locally)
|
||||||
for key in "${!ALLTALK_VARS[@]}"
|
for key in "${!ALLTALK_VARS[@]}"
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import re
|
import re
|
||||||
import unicodedata
|
import unicodedata
|
||||||
from fairseq import checkpoint_utils
|
|
||||||
from fairseq.data import Dictionary
|
|
||||||
import torch
|
|
||||||
|
|
||||||
|
# Next 2 lines are a fix for fairseq to be compatible with pytorch > 2.6
|
||||||
|
import sys
|
||||||
|
sys.path = [str(p) for p in sys.path]
|
||||||
|
|
||||||
|
from fairseq import checkpoint_utils
|
||||||
|
import torch
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logging.getLogger("fairseq").setLevel(logging.WARNING)
|
logging.getLogger("fairseq").setLevel(logging.WARNING)
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import asyncio
|
|
||||||
import ffmpeg
|
import ffmpeg
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import subprocess
|
|
||||||
|
|
||||||
# Get the parent directory of the current file
|
# Get the parent directory of the current file
|
||||||
this_dir = Path(__file__).resolve().parent.parent.parent.parent.parent
|
this_dir = Path(__file__).resolve().parent.parent.parent.parent.parent
|
||||||
|
|||||||
Reference in new issue
Block a user