Improvements to the docker build + update readme

This commit is contained in:
ekoc committed 2025-02-26 21:21:53 +01:00
1 parent 91bf7a220a
commit 385b5629b6
10 files changed
+91 -66

No files matched your search

+7 -4
View File
@@ -6,6 +6,7 @@ cd $SCRIPT_DIR
. ${SCRIPT_DIR=}/../variables.sh
DOCKER_TAG=latest
DOCKER_REPOSITORY=erew123
# Parse arguments
while [ "$#" -gt 0 ]; do
@@ -22,10 +23,12 @@ while [ "$#" -gt 0 ]; do
DOCKER_TAG="$2"
shift
;;
--github-repository)
if [ -n "${GITHUB_REPOSITORY}" ] && ! [[ $GITHUB_REPOSITORY =~ ^--.* ]]; then
GITHUB_REPOSITORY="$2"
--docker-repository)
if [ -n "$2" ] && ! [[ $2 =~ ^--.* ]]; then
DOCKER_REPOSITORY="$2"
shift
else
DOCKER_REPOSITORY=""
fi
;;
*)
@@ -43,5 +46,5 @@ docker buildx \
--progress=plain \
--build-arg CUDA_VERSION=$CUDA_VERSION \
--build-arg PYTHON_VERSION=$PYTHON_VERSION \
-t ${GITHUB_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG} \
-t ${DOCKER_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG} \
.
+2 -2
View File
@@ -1,6 +1,6 @@
ARG GITHUB_REPOSITORY
ARG DOCKER_REPOSITORY
ARG DOCKER_TAG=latest
FROM ${GITHUB_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG}
FROM ${DOCKER_REPOSITORY}alltalk_tts_environment:${DOCKER_TAG}
ARG DEEPSPEED_VERSION=0.16.3
ENV DEEPSPEED_VERSION=$DEEPSPEED_VERSION
+8 -5
View File
@@ -6,6 +6,7 @@ cd $SCRIPT_DIR
. ${SCRIPT_DIR=}/../variables.sh
DOCKER_TAG=latest
DOCKER_REPOSITORY=erew123
# Parse arguments
while [ "$#" -gt 0 ]; do
@@ -23,9 +24,11 @@ while [ "$#" -gt 0 ]; do
shift
;;
--github-repository)
if [ -n "${GITHUB_REPOSITORY}" ] && ! [[ $GITHUB_REPOSITORY =~ ^--.* ]]; then
GITHUB_REPOSITORY="$2"
if [ -n "$2" ] && ! [[ $2 =~ ^--.* ]]; then
DOCKER_REPOSITORY="$2"
shift
else
DOCKER_REPOSITORY=""
fi
;;
*)
@@ -51,9 +54,9 @@ mkdir -p build
docker buildx \
build \
--build-arg GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
--build-arg DOCKER_REPOSITORY=$DOCKER_REPOSITORY \
--build-arg DEEPSPEED_VERSION=$DEEPSPEED_VERSION \
-t ${GITHUB_REPOSITORY}alltalk_deepspeed:${DOCKER_TAG} \
-t ${DOCKER_REPOSITORY}alltalk_deepspeed:${DOCKER_TAG} \
.
docker run \
@@ -63,4 +66,4 @@ docker run \
--name deepspeed \
--build-arg DOCKER_TAG=$DOCKER_TAG \
-v $SCRIPT_DIR/build:/deepspeed \
${GITHUB_REPOSITORY}alltalk_deepspeed:${DOCKER_TAG}
${DOCKER_REPOSITORY}alltalk_deepspeed:${DOCKER_TAG}
-1
View File
@@ -5,7 +5,6 @@ ALLTALK_VARS["CUDA_VERSION"]=12.6.0
ALLTALK_VARS["PYTHON_VERSION"]=3.11.11
ALLTALK_VARS["DEEPSPEED_VERSION"]=0.16.2
ALLTALK_VARS["ALLTALK_DIR"]=/opt/alltalk
ALLTALK_VARS["GITHUB_REPOSITORY"]=
# Export single variables (needed by Docker locally)
for key in "${!ALLTALK_VARS[@]}"