rsortino commited on
Commit
72aeba0
·
verified ·
1 Parent(s): 602412a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04
2
+
3
+ RUN apt update
4
+ RUN apt install curl -y
5
+ RUN apt-get update && \
6
+ apt-get upgrade -y && \
7
+ apt-get install -y git
8
+ RUN apt install wget
9
+ RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
10
+ RUN dpkg -i cuda-keyring_1.1-1_all.deb
11
+ RUN apt-get update
12
+ RUN apt-get -y install cuda-toolkit-12-8 -y
13
+
14
+ ENV version="10.8.0.43-1+cuda12.8"
15
+ RUN apt-get install libnvinfer-bin=${version} libnvinfer-dev=${version} libnvinfer-dispatch-dev=${version} libnvinfer-dispatch10=${version} libnvinfer-headers-dev=${version} libnvinfer-headers-plugin-dev=${version} libnvinfer-lean-dev=${version} libnvinfer-lean10=${version} libnvinfer-plugin-dev=${version} libnvinfer-plugin10=${version} libnvinfer-samples=${version} libnvinfer-vc-plugin-dev=${version} libnvinfer-vc-plugin10=${version} libnvinfer10=${version} libnvonnxparsers-dev=${version} libnvonnxparsers10=${version} python3-libnvinfer-dev=${version} python3-libnvinfer-dispatch=${version} python3-libnvinfer-lean=${version} python3-libnvinfer=${version} tensorrt-dev=${version} tensorrt-libs=${version} tensorrt=${version} -y
16
+
17
+ RUN apt-mark hold libnvinfer-bin libnvinfer-dev libnvinfer-dispatch-dev libnvinfer-dispatch10 libnvinfer-headers-dev libnvinfer-headers-plugin-dev libnvinfer-lean-dev libnvinfer-lean10 libnvinfer-plugin-dev libnvinfer-plugin10 libnvinfer-samples libnvinfer-vc-plugin-dev libnvinfer-vc-plugin10 libnvinfer10 libnvonnxparsers-dev libnvonnxparsers10 python3-libnvinfer-dev python3-libnvinfer-dispatch python3-libnvinfer-lean python3-libnvinfer tensorrt-dev tensorrt-libs tensorrt
18
+
19
+ RUN useradd -m -u 1000 user
20
+ USER user
21
+ ENV PATH="/home/user/.local/bin:$PATH"
22
+
23
+ WORKDIR /app
24
+
25
+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
26
+ RUN uv venv venv --python=3.11
27
+
28
+ COPY --chown=user ./requirements.txt requirements.txt
29
+ COPY --chown=user . /app
30
+
31
+ RUN /bin/bash -c "source venv/bin/activate && uv pip install --no-cache-dir --upgrade -r requirements.txt"
32
+
33
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu
34
+
35
+ CMD ["/app/venv/bin/python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]