diff --git a/DOCKER_README.md b/DOCKER_README.md index 2070171..07da849 100644 --- a/DOCKER_README.md +++ b/DOCKER_README.md @@ -55,7 +55,7 @@ following optional arguments: - Example: `docker-start.sh --rvc_voices /my/rvc/voices/dir` - `--no_ui` allows you to not expose port 7852 for the gradio interface. Note that you still have to set `launch_gradio` to `false` via JSON file passed to `--config`. -- `--tag` allows to choose the docker tag of the image to run. Defaults to `latest`. +- `--tag` allows to choose the docker tag of the image to run. Defaults to `latest-xtts`. - Example: `docker-start.sh --tag mytag` - `--docker-repository` allows to choose another Docker repository for pulling the image from. Use an empty string for the local repo. @@ -80,7 +80,7 @@ reason, you may want to use `docker-build.sh` with the following arguments: - `--docker-repository` allows to choose another Docker repository for tagging the image from. Use an empty string for the local repo. - `--local-deepspeed-build` should only be used in rare cases where DeepSpeed needs to be rebuilt. Defaults to `false`. -- `--clean` allows remove existing dependency build like conda environment or DeepSpeed. +- `--clean` allows remove existing dependency build like conda environment or DeepSpeed. Defaults to `false`. - Example: `docker-build.sh --clean` diff --git a/docker-build.sh b/docker-build.sh index 36a46f9..2125374 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -60,6 +60,9 @@ while [ "$#" -gt 0 ]; do shift done +# Append slash if missing: +DOCKER_REPOSITORY=$(echo "$DOCKER_REPOSITORY" | sed 's![^/]$!&/!') + if [ "$CLEAN" = true ]; then rm -rf ${SCRIPT_DIR=}/docker/deepspeed/build # Recreate directories after clean diff --git a/docker-start.sh b/docker-start.sh index e1f7d35..dc0aada 100755 --- a/docker-start.sh +++ b/docker-start.sh @@ -4,7 +4,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) . ${SCRIPT_DIR=}/docker/variables.sh WITH_UI=true -DOCKER_TAG=latest +DOCKER_TAG=latest-xtts DOCKER_REPOSITORY=erew123 declare -a ADDITIONAL_ARGS=() @@ -46,10 +46,11 @@ while [ "$#" -gt 0 ]; do shift done +# Append slash if missing: +DOCKER_REPOSITORY=$(echo "$DOCKER_REPOSITORY" | sed 's![^/]$!&/!') + # Compose docker arguments based on user input to the script: declare -a DOCKER_ARGS=() -echo "REPO = $DOCKER_REPOSITORY" -exit 0 if [[ -n $CONFIG ]]; then # Mount the config file to docker_confignew.json: diff --git a/docker/base/build-base-env.sh b/docker/base/build-base-env.sh index 25e3ede..64ff350 100755 --- a/docker/base/build-base-env.sh +++ b/docker/base/build-base-env.sh @@ -39,6 +39,9 @@ while [ "$#" -gt 0 ]; do shift done +# Append slash if missing: +DOCKER_REPOSITORY=$(echo "$DOCKER_REPOSITORY" | sed 's![^/]$!&/!') + echo "Building conda environment using python ${PYTHON_VERSION} with CUDA ${CUDA_VERSION}" docker buildx \ diff --git a/docker/deepspeed/build-deepspeed.sh b/docker/deepspeed/build-deepspeed.sh index 1d133ac..3c60617 100755 --- a/docker/deepspeed/build-deepspeed.sh +++ b/docker/deepspeed/build-deepspeed.sh @@ -23,7 +23,7 @@ while [ "$#" -gt 0 ]; do DOCKER_TAG="$2" shift ;; - --github-repository) + --docker-repository) if [ -n "$2" ] && ! [[ $2 =~ ^--.* ]]; then DOCKER_REPOSITORY="$2" shift @@ -39,6 +39,9 @@ while [ "$#" -gt 0 ]; do shift done +# Append slash if missing: +DOCKER_REPOSITORY=$(echo "$DOCKER_REPOSITORY" | sed 's![^/]$!&/!') + PYTHON_SHORT_VERSION=${PYTHON_VERSION%.*} PYTHON_VERSION_NO_DOT=${PYTHON_SHORT_VERSION//./} if [[ -n $(find build -name "deepspeed-${DEEPSPEED_VERSION}*-cp${PYTHON_VERSION_NO_DOT}-cp${PYTHON_VERSION_NO_DOT}-*.whl") ]]