Skip to content

Instantly share code, notes, and snippets.

@donaldbraman
Forked from AlekseiCherkes/Dockerfile-sphinx
Created August 24, 2017 20:53
Show Gist options
  • Select an option

  • Save donaldbraman/1ef3455790f8e3e1ce121a803568b5ac to your computer and use it in GitHub Desktop.

Select an option

Save donaldbraman/1ef3455790f8e3e1ce121a803568b5ac to your computer and use it in GitHub Desktop.
CMU Sphinx docker working environment
FROM ubuntu:14.04
MAINTAINER Aleksei Cherkes <[email protected]>
# Notes:
# 1. Recommended command to run:
# 2. Default install prefix for all modules is: /usr/local/
RUN \
apt-get update && \
apt-get install -y build-essential && \
apt-get install -y swig python3-dev python3-numpy python3-scipy && \
apt-get install -y sox bison
ENV SPHINXBASE sphinxbase-5prealpha
ENV POCKETSPHINX pocketsphinx-5prealpha
ENV SPHINXTRAIN sphinxtrain-5prealpha
ADD ${SPHINXBASE}.tar.gz /sphinx/
ADD ${POCKETSPHINX}.tar.gz /sphinx/
ADD ${SPHINXTRAIN}.tar.gz /sphinx/
RUN mv /sphinx/${SPHINXBASE} /sphinx/sphinxbase
RUN mv /sphinx/${POCKETSPHINX} /sphinx/pocketsphinx
RUN mv /sphinx/${SPHINXTRAIN} /sphinx/sphinxtrain
WORKDIR /sphinx/sphinxbase
RUN ./configure --with-swig-python
RUN make
RUN make install
#RUN make check
WORKDIR /sphinx/pocketsphinx
RUN ./configure --with-swig-python
RUN make
RUN make check
RUN make install
RUN make installcheck
WORKDIR /sphinx/sphinxtrain
RUN ./configure
RUN make
RUN make check
RUN make installcheck
WORKDIR /data
# 'make install' installs all python modules to this dir.
# But Ubuntu recognizes only /usr/local/lib/python3.4/dist-packages
# dir by default. So add this dir to PYTHON_PATH manually.
ENV PYTHONPATH /usr/local/lib/python3.4/site-packages
VOLUME /sphinx
VOLUME /data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment