This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
forked from tobyatgithub/ReadalongsDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (38 loc) · 1.42 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
FROM debian:buster-slim
ENV APPHOME /opt/ReadAlongsDesktop
ENV PORT 5000
# Install system dependencies
# - swig: required by pocketsphinx
# - libpulse-dev: required by pocketsphinx
# - portaudio19-dev: required by pocketsphinx
RUN apt-get install libxml2 libxml2-dev
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
git \
swig \
libpulse-dev \
portaudio19-dev \
ffmpeg \
vim-nox
# Install 3rd party dependencies in their own layer, for faster rebuilds when we
# change ReadAlong-Studio source code
# RUN python3 -m pip install gunicorn # If you want to run production server
# We don't want Docker to cache the installation of g2p or Studio, so place them
# after COPY . $APPHOME, which almost invariable invalidates the cache.
COPY . $APPHOME
WORKDIR $APPHOME
# Get and install the latest g2p
RUN git clone https://github.com/roedoejet/g2p.git
RUN cd g2p && python3 -m pip install -e .
# Install ReadAlong-Studio itself
RUN git clone https://github.com/ReadAlongs/Studio.git
RUN cd Studio && python3 -m pip install -e .
RUN python3 -m pip install gevent
ADD requirements.txt $APPHOME/requirements.txt
RUN python3 -m pip install -r $APPHOME/requirements.txt
# Run the default gui (on localhost:5000)
CMD python3 ./run.py
# For a production server, comment out the default gui CMD above, and run the
# gui using gunicorn instead:
# CMD gunicorn -k gevent -w 1 readalongs.app:app --bind 0.0.0.0:5000