banao-tech commited on
Commit
29599b7
·
verified ·
1 Parent(s): 2e73d26

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,18 +1,21 @@
1
- FROM nvidia/cuda:12.2.2-runtime-ubuntu22.04
2
 
3
- ENV DEBIAN_FRONTEND=noninteractive
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
  COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- COPY . .
15
-
16
- EXPOSE 7860
17
-
18
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
 
1
+ FROM docker.io/nvidia/cuda:12.2.2-runtime-ubuntu22.04@sha256:94c1577b2cd9dd6c0312dc04dff9cb2fdce2b268018abc3d7c2dbcacf1155000
2
 
3
+ USER root
4
 
5
+ # Install system dependencies
6
  RUN chmod 1777 /tmp \
7
+ && apt update -q && apt install -y \
8
+ ca-certificates \
9
+ wget \
10
+ libgl1 \
11
+ python3-pip \ # Add Python and pip
12
  && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
13
  && dpkg -i /tmp/cuda-keyring.deb && apt update -q \
14
  && apt install -y --no-install-recommends libcudnn8 libcublas-12-2
15
 
16
+ # Install Python packages
17
  COPY requirements.txt .
18
+ RUN pip3 install --no-cache-dir -r requirements.txt # Use pip3
19
 
20
+ COPY main.py main.py
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]