Skip to content

Instantly share code, notes, and snippets.

@AlekseiCherkes
Created March 19, 2015 05:37
Show Gist options
  • Save AlekseiCherkes/8e8b9cd2dd22cceb77a0 to your computer and use it in GitHub Desktop.
Save AlekseiCherkes/8e8b9cd2dd22cceb77a0 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
@donaldbraman
Copy link

does this work for you? When I try, I get: Step 7/31 :

ADD ${SPHINXBASE}.tar.gz /sphinx/
ADD failed: stat /var/lib/docker/tmp/docker-builder784663947/sphinxbase-5prealpha.tar.gz: no such file or directory

@unstephenk
Copy link

@donaldbraman you need to download the files from Sourceforge.

I am building this now with 14.04. I will try to upgrade everything later after I can prove that its working but I a little confused. I don't see anything mentioned here dealing with audio. Did you run the file in --privileged mode? Is that how you got it to work?

@donaldbraman
Copy link

Ah, no worries. I'm using an API now.

@unstephenk
Copy link

@donaldbraman Do you have a repo I can look at?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment