image_text_extract / Dockerfile
som11's picture
Upload 3 files
8400f04 verified
raw
history blame contribute delete
577 Bytes
# Use the official Python image
FROM python:3.9.7
# Set the working directory in the container
WORKDIR /code
# Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# Install the dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Install Tesseract OCR via the package manager
RUN apt-get update && apt-get install -y tesseract-ocr
# Copy the entire project directory into the container
COPY . /code
# Command to run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]