Merge pull request #1956 from jeremiahrose/build-local-source
Fix #1955 Use local source instead of redownloading in Dockerfile.build
This commit is contained in:
commit
28f107fb96
|
@ -3,9 +3,6 @@
|
||||||
# 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
|
||||||
|
|
||||||
ARG STT_REPO=https://github.com/coqui-ai/STT.git
|
|
||||||
ARG STT_SHA=origin/main
|
|
||||||
|
|
||||||
# >> START Install base software
|
# >> START Install base software
|
||||||
|
|
||||||
# Get basic packages
|
# Get basic packages
|
||||||
|
@ -112,12 +109,7 @@ RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
|
||||||
# << END Configure Bazel
|
# << END Configure Bazel
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
COPY . /STT/
|
||||||
RUN git clone --recursive $STT_REPO STT
|
|
||||||
WORKDIR /STT
|
|
||||||
RUN git checkout $STT_SHA
|
|
||||||
RUN git submodule sync tensorflow/
|
|
||||||
RUN git submodule update --init tensorflow/
|
|
||||||
|
|
||||||
# >> START Build and bind
|
# >> START Build and bind
|
||||||
|
|
||||||
|
|
|
@ -158,13 +158,24 @@ Dockerfile for building from source
|
||||||
|
|
||||||
We provide ``Dockerfile.build`` to automatically build ``libstt.so``, the C++ native client, Python bindings, and KenLM.
|
We provide ``Dockerfile.build`` to automatically build ``libstt.so``, the C++ native client, Python bindings, and KenLM.
|
||||||
|
|
||||||
If you want to specify a different repository or branch, you can specify the ``STT_REPO`` or ``STT_SHA`` arguments:
|
Before building, make sure that git submodules have been initialised:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
docker build . -f Dockerfile.build --build-arg STT_REPO=git://your/fork --build-arg STT_SHA=origin/your-branch
|
git submodule sync
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
Then build with:
|
||||||
|
|
||||||
.. _runtime-deps:
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker build . -f Dockerfile.build -t stt-image
|
||||||
|
|
||||||
|
You can then use stt inside the Docker container:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker run -it stt-image bash
|
||||||
|
|
||||||
|
|
||||||
Runtime Dependencies
|
Runtime Dependencies
|
||||||
|
|
Loading…
Reference in New Issue