-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathDockerfile
47 lines (45 loc) · 2.58 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# ==================================================================
# module list
# ------------------------------------------------------------------
# flashlight master (git, CUDA backend)
# python kenlm e47088d (git, CUDA backend)
# fairseq 22e535e (git)
# ==================================================================
FROM wav2letter/wav2letter:cuda-base-26c69be
# ==================================================================
# flashlight https://github.com/flashlight/flashlight.git
# ------------------------------------------------------------------
RUN cd /root && git clone --recursive https://github.com/flashlight/flashlight.git && \
cd /root/flashlight && git checkout da99018f393c9301c9bb50908dabde954b290256 && \
git submodule update --init --recursive && mkdir -p build && \
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DFLASHLIGHT_BACKEND=CUDA && \
make -j8 && make install && \
# ==================================================================
# kenlm rebuild with max order 20 and install python wrapper
# ------------------------------------------------------------------
cd /root/kenlm/build && \
cmake .. -DKENLM_MAX_ORDER=20 && make -j8 && make install && \
cd /root/kenlm && \
sed -i 's/DKENLM_MAX_ORDER=6/DKENLM_MAX_ORDER=20/g' setup.py && \
pip install . && \
# ==================================================================
# wav2letter with GPU backend
# ------------------------------------------------------------------
cd /root && git clone --recursive https://github.com/flashlight/wav2letter.git && \
export MKLROOT=/opt/intel/mkl && export KENLM_ROOT_DIR=/root/kenlm && \
cd /root/wav2letter && git checkout tags/recipes-lexfree-paper && mkdir -p build && cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DW2L_LIBRARIES_USE_CUDA=ON -DKENLM_MAX_ORDER=20 && \
make -j8 && \
# ==================================================================
# fairseq
# ------------------------------------------------------------------
cd /root && git clone https://github.com/pytorch/fairseq && \
cd fairseq && git checkout 22e535e23b4c2e95e7e72198ae98c7e0d4ac8c18 && \
git submodule update --init --recursive && \
pip install --editable . && \
# ==================================================================
# sph2pipe
# ------------------------------------------------------------------
cd /root && wget https://www.ldc.upenn.edu/sites/www.ldc.upenn.edu/files/ctools/sph2pipe_v2.5.tar.gz && \
tar -xzf sph2pipe_v2.5.tar.gz && cd sph2pipe_v2.5 && \
gcc -o sph2pipe *.c -lm