Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -24
Dockerfile
CHANGED
@@ -1,29 +1,17 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9-slim
|
3 |
|
4 |
-
# Install system dependencies
|
5 |
-
RUN apt update -q && apt install -y \
|
6 |
-
ca-certificates \
|
7 |
-
wget \
|
8 |
-
libgl1 \
|
9 |
-
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
-
|
12 |
-
RUN pip install --no-cache-dir \
|
13 |
-
fastapi[all] \
|
14 |
-
torch \
|
15 |
-
ultralytics \
|
16 |
-
transformers \
|
17 |
-
pillow \
|
18 |
-
python-multipart \
|
19 |
-
opencv-python-headless \
|
20 |
-
easyocr \
|
21 |
-
paddleocr
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM registry.hf.space/microsoft-omniparser:latest
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
USER root
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
RUN chmod 1777 /tmp \
|
7 |
+
&& apt update -q && apt install -y ca-certificates wget libgl1 \
|
8 |
+
&& wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
|
9 |
+
&& dpkg -i /tmp/cuda-keyring.deb && apt update -q \
|
10 |
+
&& apt install -y --no-install-recommends libcudnn8 libcublas-12-2
|
11 |
|
12 |
+
RUN pip install fastapi[all]
|
13 |
+
|
14 |
+
|
15 |
+
COPY main.py main.py
|
16 |
+
RUN python main.py
|
17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|