-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dlcs/feature/update_deps
Update aws pip packages + multi stage build
- Loading branch information
Showing
4 changed files
with
19 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
FROM debian:bullseye as build | ||
|
||
# avoid issue with packages requiring interaction (e.g. tzdata) | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get install -y wget cmake clang git autoconf pkg-config | ||
|
||
# Change submodule to https as we're cloning only. Avoids issues with ssh | ||
# 8bb209c0c21476ee904a is 0.4 with some bugfixes | ||
RUN mkdir /home/pdfalto && cd /home/pdfalto \ | ||
&& git clone https://github.com/kermitt2/pdfalto.git && cd pdfalto && git checkout 8bb209c0c21476ee904a && ./install_deps.sh \ | ||
&& git submodule set-url xpdf-4.03 https://github.com/kermitt2/xpdf-4.03.git && git submodule update --init --recursive \ | ||
&& cmake ./ && make | ||
|
||
FROM python:3.11-slim | ||
|
||
LABEL maintainer="Donald Gray <[email protected]>" | ||
LABEL org.opencontainers.image.source=https://github.com/dlcs/pdf-to-alto | ||
LABEL org.opencontainers.image.description="Extract ALTO from PDF" | ||
|
||
COPY /deps/pdfalto /usr/bin/pdfalto | ||
COPY --from=build /home/pdfalto/pdfalto/pdfalto /usr/bin/pdfalto | ||
|
||
COPY requirements.txt /opt/app/requirements.txt | ||
|
||
WORKDIR /opt/app | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY app /opt/app/app | ||
COPY monitor.py /opt/app/monitor.py | ||
COPY wait-for-localstack.sh /opt/app/wait-for-localstack.sh | ||
COPY . /opt/app | ||
|
||
RUN chmod +x wait-for-localstack.sh | ||
|
||
CMD ["python3", "/opt/app/monitor.py"] | ||
CMD ["python3", "/opt/app/monitor.py"] |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters