Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /workspace
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential \
|
| 7 |
+
curl \
|
| 8 |
+
software-properties-common \
|
| 9 |
+
git \
|
| 10 |
+
tesseract-ocr \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
RUN git clone https://gitlab.com/abijithe61/yol-ov-4-tf-lite-for-generic-invoice-reader.git .
|
| 14 |
+
|
| 15 |
+
COPY requirements.txt ./
|
| 16 |
+
|
| 17 |
+
RUN pip install -r requirements.txt --no-cache-dir
|
| 18 |
+
|
| 19 |
+
# COPY models/checkpoints ./models/checkpoints
|
| 20 |
+
# COPY core ./core
|
| 21 |
+
# COPY data ./data
|
| 22 |
+
# COPY detections ./detections
|
| 23 |
+
# COPY templates ./templates
|
| 24 |
+
# COPY detect.py ./
|
| 25 |
+
# COPY main.py ./
|
| 26 |
+
|
| 27 |
+
# EXPOSE 7860
|
| 28 |
+
|
| 29 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|