Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile updates for better dev/build times #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@
FROM debian:buster-slim as buildstage
LABEL maintainer="Utsav Mishra <https://festivitymishra.github.io/>"

# Install dependencies and Google tesseract
# Install OS dependencies and Google tesseract
RUN apt-get update && \
apt-get install -y git pkg-config && \
apt-get install -y libsm6 libxext6 libxrender-dev && \
apt-get install -y cmake && \
apt-get install -y python-pip && \
apt-get install -y tesseract-ocr && \
apt-get install -y libtesseract-dev

# Create and set working directory for Python app
WORKDIR /aadhaar_ocr_masking

# Build Python APP Here
RUN mkdir aadhaar_ocr_masking


COPY Aadhaar.py /aadhaar_ocr_masking/Aadhaar.py
COPY app.py /aadhaar_ocr_masking/app.py
COPY requirements.txt /aadhaar_ocr_masking/requirements.txt

RUN cd aadhaar_ocr_masking && \
pip install -r requirements.txt
# Install pip dependencies
COPY requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt

WORKDIR /aadhaar_ocr_masking
# Copy project files to workdir
COPY Aadhaar.py app.py ./

CMD ["python", "app.py"]