-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (25 loc) · 905 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
# Use the official Debian slim image as a base
FROM debian:stable-slim
# Install dependencies
RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
libgl1 libglib2.0-0 \
python3-venv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/autotag/
ENV VIRTUAL_ENV=venv
# Create a virtual environment and install dependencies
RUN python3 -m venv venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Copy and install dependencies into the container
COPY requirements.txt /usr/autotag/
RUN pip install --no-cache-dir -r requirements.txt
# Copy sources and resources
COPY config.json /usr/autotag/
COPY src/ /usr/autotag/src/
ENTRYPOINT ["/usr/autotag/venv/bin/python3", "/usr/autotag/src/main.py"]
# docker build --rm -t pdfix-autotag-textract .
# docker run -it -v $(pwd):/usr/pdfix -w /usr/pdfix autotag-textract-arm64 autotag -i input.pdf -o output.pdf