1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
FROM ubuntu:22.04 as runtime
# Runtime packages
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip python-is-python3 perl sox libfst8 libngram2
# Installing the Ubuntu packages gives us too many dependencies :(
RUN pip install --no-cache-dir numpy scipy
FROM runtime as build
# Stuff that hopefully won't change
RUN apt-get update && apt-get install -y \
gcc g++ git cmake libfst-dev libngram-dev ninja-build
RUN git clone --depth 1 https://github.com/cmusphinx/pocketsphinx.git
WORKDIR /pocketsphinx
RUN cmake -S . -B build -G Ninja && cmake --build build --target install
RUN /sbin/ldconfig
# Set up for development
RUN useradd -UM sphinxtrain
RUN mkdir /st /work && chown sphinxtrain:sphinxtrain /st /work
RUN chown -R sphinxtrain:sphinxtrain /usr/local
WORKDIR /work
USER sphinxtrain
|