-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
49 lines (36 loc) · 1.31 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
48
49
FROM ubuntu:18.04 AS builder
ENV DEBIAN_FRONTEND="noninteractive"
ENV LC_ALL C.UTF-8
ENV lang C.UTF-8
RUN apt-get update && apt-get -y install \
git-core swig libpulse-dev libasound2-dev ffmpeg tesseract-ocr python3-pip pandoc python3.6-tk \
python3-setuptools python3-venv && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && \
python3 -m venv /app/bw_plex
ENV PATH="/app/bw_plex/bin:$PATH"
WORKDIR /src
# Python requirements from pip
RUN pip3 --no-cache-dir install pytest pytest-cov pytest-mock pytest_click pypandoc codecov \
opencv-contrib-python-headless SpeechRecognition pocketsphinx pytesseract
ADD . /src
RUN pip3 --no-cache-dir wheel -e . && pip3 --no-cache-dir install bw_plex*.whl
FROM ubuntu:18.04
LABEL maintainer="hellowlol1@gmail.com"
ENV DEBIAN_FRONTEND="noninteractive"
ENV LC_ALL C.UTF-8
ENV lang C.UTF-8
# Package requirements
RUN apt-get update && apt-get -y install \
libpulse0 libasound2 ffmpeg tesseract-ocr python3-pip pandoc python3.6-tk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/bw_plex /app/bw_plex
ENV PATH="/app/bw_plex/bin:$PATH"
# COPY root/ /
VOLUME /config
CMD ["bw_plex", "-df", "/config", "watch"]
# To build (Docker image):
# docker build -t bw_plex:latest .
# To run:
# docker run -it bw_plex
# then just do the normal bw_plex commands.