Use new name for Docker container and Docker Hub repo
This commit is contained in:
parent
86845dd022
commit
e83d92c93a
@ -1,6 +1,6 @@
|
|||||||
# These environment variables must be set in CircleCI UI
|
# 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_USER - login info for docker hub
|
||||||
# DOCKER_PASS
|
# DOCKER_PASS
|
||||||
#
|
#
|
||||||
@ -28,8 +28,8 @@ jobs:
|
|||||||
name: Create a Dockerfile.train
|
name: Create a Dockerfile.train
|
||||||
command: |
|
command: |
|
||||||
make Dockerfile.train \
|
make Dockerfile.train \
|
||||||
DEEPSPEECH_REPO="https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" \
|
MOZILLA_VOICE_STT_REPO="https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" \
|
||||||
DEEPSPEECH_SHA=$CIRCLE_SHA1
|
MOZILLA_VOICE_STT_SHA=$CIRCLE_SHA1
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Build Docker image
|
name: Build Docker image
|
||||||
@ -62,14 +62,14 @@ jobs:
|
|||||||
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
|
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
|
||||||
# deploy master
|
# deploy master
|
||||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||||
docker tag app:build ${DOCKERHUB_REPO}:latest
|
docker tag app:build ${DOCKERHUB_MOZILLA_VOICE_REPO}:latest
|
||||||
docker push ${DOCKERHUB_REPO}:latest
|
docker push ${DOCKERHUB_MOZILLA_VOICE_REPO}:latest
|
||||||
elif [ ! -z "${CIRCLE_TAG}" ]; then
|
elif [ ! -z "${CIRCLE_TAG}" ]; then
|
||||||
# deploy a release tag...
|
# deploy a release tag...
|
||||||
echo "${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|
echo "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}"
|
||||||
docker tag app:build "${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|
docker tag app:build "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}"
|
||||||
docker images
|
docker images
|
||||||
docker push "${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|
docker push "${DOCKERHUB_MOZILLA_VOICE_REPO}:${CIRCLE_TAG}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
# Need devel version cause we need /usr/include/cudnn.h
|
# Need devel version cause we need /usr/include/cudnn.h
|
||||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
||||||
|
|
||||||
ENV DEEPSPEECH_REPO=#DEEPSPEECH_REPO#
|
ENV MOZILLA_VOICE_STT_REPO=#MOZILLA_VOICE_STT_REPO#
|
||||||
ENV DEEPSPEECH_SHA=#DEEPSPEECH_SHA#
|
ENV MOZILLA_VOICE_STT_SHA=#MOZILLA_VOICE_STT_SHA#
|
||||||
|
|
||||||
# >> START Install base software
|
# >> START Install base software
|
||||||
|
|
||||||
@ -113,9 +113,9 @@ RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
|
|||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
RUN git clone --recursive $DEEPSPEECH_REPO
|
RUN git clone --recursive $MOZILLA_VOICE_STT_REPO
|
||||||
WORKDIR /DeepSpeech
|
WORKDIR /DeepSpeech
|
||||||
RUN git checkout $DEEPSPEECH_SHA
|
RUN git checkout $MOZILLA_VOICE_STT_SHA
|
||||||
RUN git submodule sync tensorflow/
|
RUN git submodule sync tensorflow/
|
||||||
RUN git submodule update --init tensorflow/
|
RUN git submodule update --init tensorflow/
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
FROM tensorflow/tensorflow:1.15.2-gpu-py3
|
FROM tensorflow/tensorflow:1.15.2-gpu-py3
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
ENV DEEPSPEECH_REPO=#DEEPSPEECH_REPO#
|
ENV MOZILLA_VOICE_STT_REPO=#MOZILLA_VOICE_STT_REPO#
|
||||||
ENV DEEPSPEECH_SHA=#DEEPSPEECH_SHA#
|
ENV MOZILLA_VOICE_STT_SHA=#MOZILLA_VOICE_STT_SHA#
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
@ -31,10 +31,10 @@ RUN apt-get install -y --no-install-recommends libopus0 libsndfile1
|
|||||||
RUN rm -rf /var/lib/apt/lists/*
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN git clone $DEEPSPEECH_REPO
|
RUN git clone $MOZILLA_VOICE_STT_REPO
|
||||||
|
|
||||||
WORKDIR /DeepSpeech
|
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
|
# Build CTC decoder first, to avoid clashes on incompatible versions upgrades
|
||||||
RUN cd native_client/ctcdecode && make NUM_PROCESSES=$(nproc) bindings
|
RUN cd native_client/ctcdecode && make NUM_PROCESSES=$(nproc) bindings
|
||||||
|
8
Makefile
8
Makefile
@ -1,8 +1,8 @@
|
|||||||
DEEPSPEECH_REPO ?= https://github.com/mozilla/DeepSpeech.git
|
MOZILLA_VOICE_STT_REPO ?= https://github.com/mozilla/DeepSpeech.git
|
||||||
DEEPSPEECH_SHA ?= origin/master
|
MOZILLA_VOICE_STT_SHA ?= origin/master
|
||||||
|
|
||||||
Dockerfile%: Dockerfile%.tmpl
|
Dockerfile%: Dockerfile%.tmpl
|
||||||
sed \
|
sed \
|
||||||
-e "s|#DEEPSPEECH_REPO#|$(DEEPSPEECH_REPO)|g" \
|
-e "s|#MOZILLA_VOICE_STT_REPO#|$(MOZILLA_VOICE_STT_REPO)|g" \
|
||||||
-e "s|#DEEPSPEECH_SHA#|$(DEEPSPEECH_SHA)|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
|
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
|
.. 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
|
Common Voice training data
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -219,11 +219,11 @@ You need to generate the Dockerfile from the template using:
|
|||||||
|
|
||||||
make Dockerfile.build
|
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
|
.. 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
|
Third party bindings
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -35,7 +35,7 @@ then:
|
|||||||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" &&
|
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 &&
|
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} &&
|
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} .
|
docker build --file ${dockerfile} .
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
Loading…
Reference in New Issue
Block a user