Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -24
Dockerfile
CHANGED
|
@@ -1,30 +1,16 @@
|
|
| 1 |
-
|
| 2 |
-
FROM registry.hf.space/banao-tech/omniparser1:latest
|
| 3 |
|
| 4 |
USER root
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
libglib2.0-0 \
|
| 12 |
-
libsm6 \
|
| 13 |
-
libxext6 \
|
| 14 |
-
libxrender-dev \
|
| 15 |
-
&& ln -s /usr/bin/python3.10 /usr/bin/python \
|
| 16 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
-
|
| 18 |
-
# Copy and install Python requirements
|
| 19 |
-
COPY requirements.txt .
|
| 20 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
|
| 23 |
-
COPY main.py main.py
|
| 24 |
-
COPY utils.py utils.py
|
| 25 |
|
| 26 |
-
# Run your main script
|
| 27 |
-
RUN python main.py
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
| 1 |
+
FROM registry.hf.space/microsoft-omniparser:latest
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
RUN chmod 1777 /tmp \
|
| 6 |
+
&& apt update -q && apt install -y ca-certificates wget libgl1 \
|
| 7 |
+
&& wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
|
| 8 |
+
&& dpkg -i /tmp/cuda-keyring.deb && apt update -q \
|
| 9 |
+
&& apt install -y --no-install-recommends libcudnn8 libcublas-12-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
RUN pip install fastapi[all]
|
|
|
|
|
|
|
| 12 |
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
COPY main.py main.py
|
| 15 |
+
RUN python main.py
|
| 16 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|