Skip to content

Instantly share code, notes, and snippets.

@qharlie
Created February 9, 2017 18:32
Show Gist options
  • Save qharlie/75b64cb2d3fdbaa34792d2041cbb73c2 to your computer and use it in GitHub Desktop.
Save qharlie/75b64cb2d3fdbaa34792d2041cbb73c2 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
LABEL maintainer "Charlie"
LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV DEBIAN_FRONTEND noninteractive
RUN NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list
COPY ./fs/keyboard /etc/default/keyboard
ENV CUDA_VERSION 8.0
LABEL com.nvidia.cuda.version="8.0"
ENV CUDA_PKG_VERSION 8-0=8.0.44-1
RUN apt-get update && apt-get install --yes --no-install-recommends \
cuda-nvrtc-$CUDA_PKG_VERSION \
cuda-nvgraph-$CUDA_PKG_VERSION \
cuda-cusolver-$CUDA_PKG_VERSION \
cuda-cublas-$CUDA_PKG_VERSION \
cuda-cufft-$CUDA_PKG_VERSION \
cuda-curand-$CUDA_PKG_VERSION \
cuda-cusparse-$CUDA_PKG_VERSION \
cuda-npp-$CUDA_PKG_VERSION \
cuda-cudart-$CUDA_PKG_VERSION \
cuda-toolkit-$CUDA_VERSION \
cuda-drivers cuda-samples-8-0 && \
ln -s cuda-$CUDA_VERSION /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
RUN echo "/usr/local/cuda/lib" >> /etc/ld.so.conf.d/cuda.conf && \
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/cuda.conf && \
ldconfig
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
# Base items for building
RUN apt-get update && apt-get install -y mlocate emacs-nox git \
g++ zlib1g-dev make gcc automake autoconf bzip2 wget libtool subversion
# Now kaldi specific items
RUN apt-get update && apt-get install -y libatlas3-base
RUN apt-get update && apt-get install -y python2.7 python-pip
RUN git clone https://github.com/qorrect/kaldi.git && ln -s -f bash /bin/sh
#Now build
ENV NJ 4
RUN cd /kaldi/tools && make -j 4 && extras/install_irstlm.sh
RUN cd /kaldi/src && ./configure && make -j 4
RUN apt-get install unzip
RUN cd /kaldi/egs/apiai_decode/s5 && ./download-model.sh
#RUN cd kaldi/src && ./configure && make -j $NJ
# MOVE INLINE
#RUN apt-get install -y
COPY ./fs/run.py /run.py
CMD /run.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment