diff --git a/Dockerfile b/Dockerfile index ac7b7c5..2e3a3e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,27 +2,24 @@ FROM debian:buster-slim as buildstage LABEL maintainer="Utsav Mishra " -# 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"]