forked from charslab/TranscriberBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 855 Bytes
/
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
FROM python:3.9-slim
# Set global configs
WORKDIR /
RUN export LC_ALL=C
RUN export LC_CTYPE=C
RUN export LC_NUMERIC=C
# Install system dependencies
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
build-essential \
ffmpeg \
libleptonica-dev \
libtesseract-dev \
libzbar-dev \
python3-dev \
tesseract-ocr \
&& \
apt-get clean
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -U pip && \
pip install --no-cache-dir -r requirements.txt
# Copy code and define default command
COPY src/ src/
RUN useradd -m transcriber
RUN chown -R transcriber src/
RUN chown -R transcriber media/
USER transcriber
CMD [ "python", "src/main.py" ]