banao-tech commited on
Commit
c29d787
·
verified ·
1 Parent(s): 1a6ef75

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -31
Dockerfile CHANGED
@@ -1,39 +1,16 @@
1
- FROM docker.io/nvidia/cuda:12.2.2-runtime-ubuntu22.04
2
 
3
  USER root
4
 
5
- ENV MPLCONFIGDIR=/tmp/matplotlib \
6
- TRANSFORMERS_CACHE=/tmp/huggingface \
7
- HUGGINGFACE_HUB_CACHE=/tmp/huggingface \
8
- DEBIAN_FRONTEND=noninteractive
9
-
10
- # Install system dependencies with correct OpenSSL 1.1 URL
11
  RUN chmod 1777 /tmp \
12
- && apt-get update -q \
13
- && apt-get install -y --no-install-recommends \
14
- ca-certificates \
15
- wget \
16
- libgl1 \
17
- python3 \
18
- python3-pip \
19
- libglib2.0-0 \
20
- git \
21
- && wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \
22
- && dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \
23
- && rm libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \
24
  && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
25
- && dpkg -i /tmp/cuda-keyring.deb \
26
- && apt-get update -q \
27
- && apt-get install -y --no-install-recommends \
28
- libcudnn8 \
29
- libcublas-12-2 \
30
- && apt-get clean \
31
- && rm -rf /var/lib/apt/lists/* \
32
- && mkdir -p ${MPLCONFIGDIR} ${TRANSFORMERS_CACHE} \
33
- && chmod -R 777 /tmp
34
 
35
- COPY requirements.txt .
36
- RUN pip3 install --no-cache-dir -r requirements.txt
37
 
38
- COPY main.py .
 
39
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
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"]