| # Use an official Python runtime as a parent image | |
| FROM python:3.11-slim | |
| # Install Tesseract OCR | |
| RUN apt-get update && \ | |
| apt-get install -y tesseract-ocr && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the requirements file into the container | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create necessary directories | |
| RUN mkdir -p /app/uploads/resume /app/uploads/desc /app/images/resumes /app/images/descriptions | |
| # Set appropriate permissions | |
| RUN chmod -R 755 /app/uploads /app/images | |
| # Copy the rest of the application code into the container | |
| COPY . . | |
| EXPOSE 7860 | |
| # Specify the command to run on container start | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"] | |