OCT-to-Markdown / Dockerfile
Vishal Sharma
docker update for folder write permission
10eddf4
raw
history blame contribute delete
729 Bytes
# Base image with FastAPI support
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
# Install Tesseract OCR and required language packs
RUN apt-get update && apt-get install -y tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-rus \
tesseract-ocr-msa && \
apt-get clean
# Set the working directory
WORKDIR /app
# Copy project files
COPY . /app
# Create directories with correct permissions
RUN mkdir -p /app/uploads /app/outputs && chmod -R 777 /app/uploads /app/outputs
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the default port used by Hugging Face
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]