-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
24 lines (19 loc) · 1.28 KB
/
Dockerfile.dev
File metadata and controls
24 lines (19 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ARG os=ubuntu2204 tag=8.5.0-cuda-11.7
#FROM nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
#RUN dpkg -i nv-tensorrt-local-repo-${os}-${tag}_1.0-1_amd64.deb \
# && cp /var/nv-tensorrt-local-repo-${os}-${tag}/*-keyring.gpg /usr/share/keyrings/ \
# && apt-get update
FROM nvcr.io/nvidia/tensorrt:22.10-py3
# install libtorch
RUN cd ~/ && wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcu118.zip \
&& unzip libtorch-cxx11-abi-shared-with-deps-2.0.0+cu118.zip -d /usr/local/ \
&& rm -f libtorch-cxx11-abi-shared-with-deps-2.0.0+cu118.zip
# install opencv
RUN apt update && apt install libopencv-dev -y
# install python essential dependencies
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
RUN pip3 install numpy pillow matplotlib pycocotools opencv-python onnx onnxruntime -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN apt update && apt install gdb libyaml-cpp-dev -y
WORKDIR /workspace
RUN wget -O vision.zip https://github.com/pytorch/vision/archive/refs/tags/v0.15.2.zip && unzip vision.zip
RUN cd vision-0.15.2 && mkdir build && cd build && cmake .. -DWITH_CUDA=on -DTorch_DIR=/usr/local/libtorch/share/cmake/Torch -DCMAKE_PREFIX_PATH=/usr/local/torchvision && make -j8 && make install