code / Dockerfile
jkushwaha's picture
Update Dockerfile
c4588ab verified
raw
history blame
1.47 kB
# FROM python:3.7.9
FROM scratch
# Copy the Python 3.7.9 tarball file into the container
COPY python-3.7.9.tgz /python-3.7.9.tgz
# Extract the Python tarball
RUN tar -xzvf /python-3.7.9.tgz -C /
# Set the PATH environment variable to include Python
ENV PATH="/python-3.7.9/bin:${PATH}"
COPY requirements.txt /genome_inbound_automation/requirements.txt
WORKDIR /genome_inbound_automation
RUN pip install -r requirements.txt
RUN sed -i 's/<policy domain="coder" rights="none" pattern="PDF"/<policy domain="coder" rights="read" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml
RUN sed -i 's/<policy domain="resource" name="memory" value="256MiB"/<policy domain="resource" name="memory" value="2GiB"/g' /etc/ImageMagick-6/policy.xml
RUN sed -i 's/<policy domain="resource" name="disk" value="1GiB"/<policy domain="resource" name="disk" value="8GiB"/g' /etc/ImageMagick-6/policy.xml
RUN apt-get -y update && apt-get -y install ghostscript
RUN apt-get update && apt-get install -y wget
RUN wget www.leptonica.org/source/leptonica-1.84.1.tar.gz
RUN tar -xvzf leptonica-1.84.1.tar.gz
WORKDIR leptonica-1.84.1
RUN ./configure
RUN make
RUN make install
WORKDIR /
RUN git clone https://github.com/tesseract-ocr/tesseract.git
WORKDIR /tesseract
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install
RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg
RUN ldconfig
COPY ./src /genome_inbound_automation
RUN chmod 777 /genome_inbound_automation/batchjob.sh