-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.txt
15 lines (12 loc) · 920 Bytes
/
Dockerfile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# docker build -f ./Dockerfile.txt -t yolox .
FROM nvcr.io/nvidia/pytorch:21.06-py3
# install douban pip source, boost installation
RUN mkdir ~/.pip && echo -e "[global]\nindex-url = https://pypi.doubanio.com/simple\ntrusted-host = pypi.doubanio.com\n" > ~/.pip/pip.conf
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt && pip install cython 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install ffmpeg libsm6 libxext6 -y
# install torch2trt
RUN cd /tmp && git clone https://github.com/NVIDIA-AI-IOT/torch2trt && cd /tmp/torch2trt && python setup.py install && rm -rf /tmp/torch2trt
RUN cd /tmp && git clone https://github.com/NVIDIA/apex && cd apex && pip install -v \
--disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ &&\
rm /tmp/apex -rf