From e83d92c93a2c040de9ad559ad020e5857768579d Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Mon, 10 Aug 2020 20:19:50 +0200 Subject: [PATCH] Use new name for Docker container and Docker Hub repo --- .circleci/config.yml | 16 ++++++++-------- Dockerfile.build.tmpl | 8 ++++---- Dockerfile.train.tmpl | 8 ++++---- Makefile | 8 ++++---- doc/TRAINING.rst | 4 ++-- doc/USING.rst | 4 ++-- taskcluster/docker-build-base.tyml | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e7f804d..14d0fb0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ # These environment variables must be set in CircleCI UI # -# DOCKERHUB_REPO - docker hub repo, format: / +# DOCKERHUB_MOZILLA_VOICE_REPO - docker hub repo, format: / # DOCKER_USER - login info for docker hub # DOCKER_PASS # @@ -28,8 +28,8 @@ jobs: name: Create a Dockerfile.train command: | make Dockerfile.train \ - DEEPSPEECH_REPO="https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" \ - DEEPSPEECH_SHA=$CIRCLE_SHA1 + MOZILLA_VOICE_STT_REPO="https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" \ + MOZILLA_VOICE_STT_SHA=$CIRCLE_SHA1 - run: name: Build Docker image @@ -62,14 +62,14 @@ jobs: echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin # deploy master if [ "${CIRCLE_BRANCH}" == "master" ]; then - docker tag app:build ${DOCKERHUB_REPO}:latest - docker push ${DOCKERHUB_REPO}:latest + docker tag app:build ${DOCKERHUB_MOZILLA_VOICE_REPO}:latest + docker push ${DOCKERHUB_MOZILLA_VOICE_REPO}:latest elif [ ! -z "${CIRCLE_TAG}" ]; then # deploy a release tag... - echo "${DOCKERHUB_REPO}:${CIRCLE_TAG}" - docker tag app:build "${DOCKERHUB_REPO}:${CIRCLE_TAG}" + echo "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}" + docker tag app:build "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}" docker images - docker push "${DOCKERHUB_REPO}:${CIRCLE_TAG}" + docker push "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}" fi workflows: diff --git a/Dockerfile.build.tmpl b/Dockerfile.build.tmpl index a3982312..c8ad3e74 100644 --- a/Dockerfile.build.tmpl +++ b/Dockerfile.build.tmpl @@ -3,8 +3,8 @@ # Need devel version cause we need /usr/include/cudnn.h FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 -ENV DEEPSPEECH_REPO=#DEEPSPEECH_REPO# -ENV DEEPSPEECH_SHA=#DEEPSPEECH_SHA# +ENV MOZILLA_VOICE_STT_REPO=#MOZILLA_VOICE_STT_REPO# +ENV MOZILLA_VOICE_STT_SHA=#MOZILLA_VOICE_STT_SHA# # >> START Install base software @@ -113,9 +113,9 @@ RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \ WORKDIR / -RUN git clone --recursive $DEEPSPEECH_REPO +RUN git clone --recursive $MOZILLA_VOICE_STT_REPO WORKDIR /DeepSpeech -RUN git checkout $DEEPSPEECH_SHA +RUN git checkout $MOZILLA_VOICE_STT_SHA RUN git submodule sync tensorflow/ RUN git submodule update --init tensorflow/ diff --git a/Dockerfile.train.tmpl b/Dockerfile.train.tmpl index e3b47795..b289cf7a 100644 --- a/Dockerfile.train.tmpl +++ b/Dockerfile.train.tmpl @@ -3,8 +3,8 @@ FROM tensorflow/tensorflow:1.15.2-gpu-py3 ENV DEBIAN_FRONTEND=noninteractive -ENV DEEPSPEECH_REPO=#DEEPSPEECH_REPO# -ENV DEEPSPEECH_SHA=#DEEPSPEECH_SHA# +ENV MOZILLA_VOICE_STT_REPO=#MOZILLA_VOICE_STT_REPO# +ENV MOZILLA_VOICE_STT_SHA=#MOZILLA_VOICE_STT_SHA# RUN apt-get update && apt-get install -y --no-install-recommends \ apt-utils \ @@ -31,10 +31,10 @@ RUN apt-get install -y --no-install-recommends libopus0 libsndfile1 RUN rm -rf /var/lib/apt/lists/* WORKDIR / -RUN git clone $DEEPSPEECH_REPO +RUN git clone $MOZILLA_VOICE_STT_REPO WORKDIR /DeepSpeech -RUN git checkout $DEEPSPEECH_SHA +RUN git checkout $MOZILLA_VOICE_STT_SHA # Build CTC decoder first, to avoid clashes on incompatible versions upgrades RUN cd native_client/ctcdecode && make NUM_PROCESSES=$(nproc) bindings diff --git a/Makefile b/Makefile index 2d28d24b..45e950fe 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -DEEPSPEECH_REPO ?= https://github.com/mozilla/DeepSpeech.git -DEEPSPEECH_SHA ?= origin/master +MOZILLA_VOICE_STT_REPO ?= https://github.com/mozilla/DeepSpeech.git +MOZILLA_VOICE_STT_SHA ?= origin/master Dockerfile%: Dockerfile%.tmpl sed \ - -e "s|#DEEPSPEECH_REPO#|$(DEEPSPEECH_REPO)|g" \ - -e "s|#DEEPSPEECH_SHA#|$(DEEPSPEECH_SHA)|g" \ + -e "s|#MOZILLA_VOICE_STT_REPO#|$(MOZILLA_VOICE_STT_REPO)|g" \ + -e "s|#MOZILLA_VOICE_STT_SHA#|$(MOZILLA_VOICE_STT_SHA)|g" \ < $< > $@ diff --git a/doc/TRAINING.rst b/doc/TRAINING.rst index e43c6829..be0b3c8d 100644 --- a/doc/TRAINING.rst +++ b/doc/TRAINING.rst @@ -88,11 +88,11 @@ This should ensure that you'll re-use the upstream Python 3 TensorFlow GPU-enabl make Dockerfile.train -If you want to specify a different Mozilla Voice STT repository / branch, you can pass ``DEEPSPEECH_REPO`` or ``DEEPSPEECH_SHA`` parameters: +If you want to specify a different Mozilla Voice STT repository / branch, you can pass ``MOZILLA_VOICE_STT_REPO`` or ``MOZILLA_VOICE_STT_SHA`` parameters: .. code-block:: bash - make Dockerfile.train DEEPSPEECH_REPO=git://your/fork DEEPSPEECH_SHA=origin/your-branch + make Dockerfile.train MOZILLA_VOICE_STT_REPO=git://your/fork MOZILLA_VOICE_STT_SHA=origin/your-branch Common Voice training data ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/USING.rst b/doc/USING.rst index 1701c31b..83bcc321 100644 --- a/doc/USING.rst +++ b/doc/USING.rst @@ -219,11 +219,11 @@ You need to generate the Dockerfile from the template using: make Dockerfile.build -If you want to specify a different Mozilla Voice STT repository / branch, you can pass ``DEEPSPEECH_REPO`` or ``DEEPSPEECH_SHA`` parameters: +If you want to specify a different Mozilla Voice STT repository / branch, you can pass ``MOZILLA_VOICE_STT_REPO`` or ``MOZILLA_VOICE_STT_SHA`` parameters: .. code-block:: bash - make Dockerfile.build DEEPSPEECH_REPO=git://your/fork DEEPSPEECH_SHA=origin/your-branch + make Dockerfile.build MOZILLA_VOICE_STT_REPO=git://your/fork MOZILLA_VOICE_STT_SHA=origin/your-branch Third party bindings ^^^^^^^^^^^^^^^^^^^^ diff --git a/taskcluster/docker-build-base.tyml b/taskcluster/docker-build-base.tyml index d416bc0b..2063e064 100644 --- a/taskcluster/docker-build-base.tyml +++ b/taskcluster/docker-build-base.tyml @@ -35,7 +35,7 @@ then: add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && apt-get -qq update && apt-get -qq -y install docker-ce && mkdir -p /opt/deepspeech && git clone --quiet ${event.head.repo.url} /opt/deepspeech && cd /opt/deepspeech && git checkout --quiet ${event.head.sha} && - make ${dockerfile} DEEPSPEECH_REPO=${event.head.repo.url} DEEPSPEECH_SHA=${event.head.sha} && + make ${dockerfile} MOZILLA_VOICE_STT_REPO=${event.head.repo.url} MOZILLA_VOICE_STT_SHA=${event.head.sha} && docker build --file ${dockerfile} . artifacts: