textExtractor / Dockerfile
baxin's picture
Update Dockerfile
e41bcfc verified
raw
history blame
975 Bytes
# Use an official Python runtime as a parent image
FROM python:3.12
ENV PIP_ROOT_USER_ACTION=ignore
# Set the working directory in the container
WORKDIR $HOME/app
# Install system dependencies
RUN apt-get update && apt-get install -y
RUN apt-get install -y tesseract-ocr
RUN apt-get install -y libtesseract-dev
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libglib2.0-0
RUN pip install --upgrade pip
# RUN pip install gradio pytesseract Pillow
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
#COPY . /app
# Copy your app code
COPY app.py ./
# Expose the port your app listens on
EXPOSE 7860
# Install any needed packages specified in requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt
# Make port 7860 available to the world outside this container
#EXPOSE 7860
# Run app.py when the container launches
CMD ["python", "app.py"]