forked from ritesh-1918/HELPDESK.AI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 1.04 KB
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
33
34
35
# Use an official Python runtime as a parent image
FROM python:3.10-slim
LABEL version="1.1.1" rebuild_trigger="2026-03-08-2032"
# Set the working directory to /app
WORKDIR /app
# Install system dependencies required for EasyOCR and OpenCV
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY backend/requirements.txt .
# Install dependencies (no-cache-dir keeps the docker image smaller)
RUN pip install --no-cache-dir -r requirements.txt
# Copy all the remaining files into the container as a 'backend' directory
COPY backend /app/backend
# Tell Python where to look for modules (so it can find the 'backend' folder)
ENV PYTHONPATH=/app
# Expose port 7860 (Hugging Face Spaces default)
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=5s --start-period=120s --retries=3 \
CMD ["python", "backend/healthcheck.py"]
# Run the FastAPI server via Uvicorn
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]