Spaces:
Sleeping
Sleeping
File size: 672 Bytes
9b367b6 640693b 9392ba0 9b367b6 0dde85b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# Dockerfile
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
tesseract-ocr \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create uploads directory
RUN mkdir -p uploads && chmod -R 777 uploads
# Copy application files
COPY app.py .
COPY templates/index.html templates/
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# Expose port
EXPOSE 7860
# Command to run the application
CMD ["gunicorn", "--bind", "0.0.0.0:7860","--timeout", "240", "app:app"]
|