awacke1 commited on
Commit
e97b079
·
1 Parent(s): 92401b0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvcr.io/nvidia/tensorrt:22.10-py3
2
+
3
+ WORKDIR /content
4
+
5
+ RUN apt-get update
6
+ RUN apt install -y software-properties-common
7
+ RUN add-apt-repository ppa:flexiondotorg/nvtop
8
+ RUN apt-get update
9
+ RUN apt-get install -y nvtop
10
+ RUN apt-get install -y tmux nano
11
+ RUN apt-get upgrade -y
12
+
13
+ RUN pip install pyxtermjs
14
+
15
+ RUN adduser --disabled-password --gecos '' user
16
+ RUN chown -R user:user /content
17
+ RUN chmod -R 777 /content
18
+ USER user
19
+
20
+ RUN git clone --branch release/8.5.1 --single-branch https://github.com/camenduru/TensorRT && \
21
+ cd TensorRT && \
22
+ git submodule update --init --recursive
23
+
24
+ RUN cd TensorRT && mkdir -p build && \
25
+ cd build && \
26
+ cmake /content/TensorRT -DTRT_OUT_DIR=$PWD/out && \
27
+ cd plugin && \
28
+ make -j$(nproc)
29
+
30
+ ENV PLUGIN_LIBS "/content/TensorRT/build/out/libnvinfer_plugin.so"
31
+ ENV TERM=xterm-256color
32
+
33
+ RUN pip install -r /content/TensorRT/demo/Diffusion/requirements.txt
34
+ RUN cd /content/TensorRT/demo/Diffusion && mkdir -p onnx engine output
35
+
36
+ EXPOSE 7860
37
+
38
+ CMD pyxtermjs -p 7860 --host 0.0.0.0