banao-tech commited on
Commit
7c3f563
·
verified ·
1 Parent(s): 31b9e9a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -12
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- # Set up base image (use the correct Hugging Face registry)
2
- FROM registry.huggingface.co\space\microsoft-omniparser:latest
3
 
 
4
 
5
- USER root
 
 
 
 
 
 
 
 
6
 
7
- RUN chmod 1777 /tmp \
8
- && apt update -q && apt install -y ca-certificates wget libgl1 \
9
- && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
10
- && dpkg -i /tmp/cuda-keyring.deb && apt update -q \
11
- && apt install -y --no-install-recommends libcudnn8 libcublas-12-2
12
 
13
- RUN pip install fastapi[all]
14
 
 
15
 
16
- COPY main.py main.py
17
- RUN python main.py
18
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM nvidia/cuda:12.2.2-runtime-ubuntu22.04
 
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ RUN apt-get update -q && \
6
+ apt-get install -y --no-install-recommends \
7
+ python3-pip \
8
+ python3-dev \
9
+ ffmpeg \
10
+ libgl1 \
11
+ git \
12
+ wget \
13
+ && rm -rf /var/lib/apt/lists/*
14
 
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
17
 
18
+ COPY . .
19
 
20
+ EXPOSE 7860
21
 
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]