irandoc_ocr / Dockerfile
Alizmoh98's picture
fixed dockerfile
eb684c9
FROM python:3.11
# 1) Workdir
WORKDIR /code
# 2) Copy requirements and install Python deps
COPY requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# 3) Install system deps needed by OpenCV etc. (no mesa-glx here)
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
# 4) Copy your source code
COPY ./src /code/src
# 5) (Optional) Ensure boxes dir exists; your code also creates it, so this is just extra safety
RUN mkdir -p /code/src/boxes && chmod 777 /code/src/boxes
# 6) Start FastAPI+Gradio app
CMD ["uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "7860"]