xce009 commited on
Commit
e62fae2
·
verified ·
1 Parent(s): 690d90f

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -57
Dockerfile DELETED
@@ -1,57 +0,0 @@
1
- FROM python:3.11-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install system dependencies for BOTH Tesseract and RapidOCR
6
- RUN apt-get update && apt-get install -y \
7
- curl \
8
- # Tesseract with language packs
9
- tesseract-ocr \
10
- tesseract-ocr-eng \
11
- tesseract-ocr-deu \
12
- tesseract-ocr-fra \
13
- tesseract-ocr-spa \
14
- tesseract-ocr-por \
15
- tesseract-ocr-ita \
16
- tesseract-ocr-rus \
17
- tesseract-ocr-chi-sim \
18
- tesseract-ocr-jpn \
19
- tesseract-ocr-kor \
20
- # PDF processing
21
- poppler-utils \
22
- # RapidOCR dependencies
23
- libgl1 \
24
- libglib2.0-0 \
25
- libgomp1 \
26
- gcc \
27
- g++ \
28
- && rm -rf /var/lib/apt/lists/*
29
-
30
- # Environment variables
31
- ENV PYTHONUNBUFFERED=1
32
- ENV PYTHONIOENCODING=UTF-8
33
- ENV HF_HOME=/tmp/cache
34
- ENV PORT=7860
35
- ENV DEFAULT_OCR_ENGINE=tesseract
36
-
37
- # Install Python dependencies
38
- COPY requirements.txt .
39
- RUN pip install --upgrade pip setuptools wheel \
40
- && pip install --default-timeout=100 --retries=10 --no-cache-dir -r requirements.txt
41
-
42
- # Copy application
43
- COPY . .
44
-
45
- # Create non-root user
46
- RUN useradd -m appuser && chown -R appuser /app
47
- USER appuser
48
-
49
- # Create cache directory
50
- RUN mkdir -p ${HF_HOME} && chmod 777 ${HF_HOME}
51
-
52
- EXPOSE $PORT
53
-
54
- # Start application
55
- CMD bash -c "\
56
- (while true; do curl -s https://xce009-ocr-api.hf.space >/dev/null; sleep 300; done) & \
57
- uvicorn main:app --host 0.0.0.0 --port ${PORT} --workers 4"