Skip to content

Commit

Permalink
Add PDF converter in Dockerfiles (deepset-ai#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
oryx1729 authored Mar 8, 2021
1 parent 81b8329 commit 6d00eff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ WORKDIR /home/user

RUN apt-get update && apt-get install -y curl git pkg-config cmake

# Install PDF converter
RUN wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz && \
tar -xvf xpdf-tools-linux-4.03.tar.gz && cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin

# copy code
COPY haystack /home/user/haystack

Expand Down
6 changes: 5 additions & 1 deletion Dockerfile-GPU
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM nvidia/cuda:11.0-runtime-ubuntu20.04
WORKDIR /home/user

RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y python3.7 python3.7-dev python3.7-distutils python3-pip curl git pkg-config cmake swig
RUN apt-get update && apt-get install -y python3.7 python3.7-dev python3.7-distutils python3-pip curl wget git pkg-config cmake swig

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand All @@ -12,6 +12,10 @@ ENV LANG=C.UTF-8
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
RUN update-alternatives --set python3 /usr/bin/python3.7

# Install PDF converter
RUN wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz && \
tar -xvf xpdf-tools-linux-4.03.tar.gz && cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin

# copy code
COPY haystack /home/user/haystack

Expand Down

0 comments on commit 6d00eff

Please sign in to comment.