Update Dockerfile
Browse files- Dockerfile +24 -16
Dockerfile
CHANGED
@@ -1,16 +1,24 @@
|
|
1 |
-
FROM registry.hf.space/microsoft-omniparser:latest
|
2 |
-
|
3 |
-
USER root
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
&&
|
9 |
-
&&
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
COPY
|
15 |
-
RUN
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM registry.hf.space/microsoft-omniparser:latest
|
2 |
+
|
3 |
+
USER root
|
4 |
+
|
5 |
+
# Install CUDA dependencies
|
6 |
+
RUN apt update -q && apt install -y --no-install-recommends \
|
7 |
+
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 |
+
&& rm -rf /var/lib/apt/lists/* /tmp/cuda-keyring.deb
|
12 |
+
|
13 |
+
# Install Python dependencies
|
14 |
+
COPY requirements.txt requirements.txt
|
15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
+
|
17 |
+
# Copy application files
|
18 |
+
COPY main.py main.py
|
19 |
+
|
20 |
+
# Expose application port
|
21 |
+
EXPOSE 7860
|
22 |
+
|
23 |
+
# Set the entrypoint for the container
|
24 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|