Skip to content

Commit

Permalink
build (train): prepare docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jun 20, 2017
1 parent 3a3b423 commit 662b86e
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
FROM recog/pytorch
#FROM recog/pytorch
FROM recog/pytorch:py3.5-gpu-cuda8

ENV DEBIAN_FRONTEND noninteractive
ENV CUDA_HOME /usr/local/cuda

RUN apt-get update && apt-get install -q -y \
sox libsox-dev libsox-fmt-all gcc-4.8 g++-4.8 cmake git \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 \
&& git clone https://github.com/recognai/warp-ctc.git /workspace/warp-ctc \
&& git clone https://github.com/pytorch/audio.git /workspace/audio \
&& mkdir -p /workspace/warp-ctc/build \
&& rm -rf /usr/local/lib/python3.5/dist-packages/torch/lib/libgomp.so.1

WORKDIR /workspace/warp-ctc/build
RUN cmake .. && make

WORKDIR /workspace
RUN git clone https://github.com/recognai/warp-ctc.git \
&& mkdir warp-ctc/build
WORKDIR warp-ctc/build

RUN cmake .. \
&& make \
&& export CUDA_HOME="/usr/local/cuda"

WORKDIR ../pytorch_binding

RUN pip install cffi && python setup.py install

WORKDIR /workspace
RUN apt-get update \
&& apt-get install -q -y sox libsox-dev libsox-fmt-all \
&& git clone https://github.com/pytorch/audio.git
WORKDIR audio

WORKDIR /workspace/audio
RUN python setup.py install

WORKDIR /workspace
Expand Down

0 comments on commit 662b86e

Please sign in to comment.