Merge pull request #3239 from lissyx/rename-circleci

Use new name for Docker container and Docker Hub repo
This commit is contained in:
lissyx 2020-08-10 20:26:15 +02:00 коммит произвёл GitHub
Родитель 86845dd022 e83d92c93a
Коммит 08cebeda3c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 25 добавлений и 25 удалений

Просмотреть файл

@ -1,6 +1,6 @@
# These environment variables must be set in CircleCI UI
#
# DOCKERHUB_REPO - docker hub repo, format: <username>/<repo>
# DOCKERHUB_MOZILLA_VOICE_REPO - docker hub repo, format: <username>/<repo>
# 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:

Просмотреть файл

@ -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/

Просмотреть файл

@ -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

Просмотреть файл

@ -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" \
< $< > $@

Просмотреть файл

@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^

Просмотреть файл

@ -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
^^^^^^^^^^^^^^^^^^^^

Просмотреть файл

@ -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: