Creating YOLACT docker image

posted by Anil Kumar Shrestha on 2020-08-25

  1. Create Dockerfile in root of the project.
FROM nvidia/cuda:10.1-cudnn8-devel-ubuntu18.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt install -y git pkg-config python3 python3-pip
RUN python3 -m pip install --upgrade pip
RUN cd /root && git clone https://github.com/dbolya/yolact.git && cd yolact
COPY yolact_resnet50_54_800000.pth /root/yolact
WORKDIR /root/yolact
COPY requirements.txt /root/yolact
RUN pip3 install cython numpy
RUN pip3 install -r requirements.txt
RUN pip3 install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

Notes:

docker run --name yolact -it -v /mnt/disk1/object-detection/anil/yolo/:/root/yolact/mnt --gpus all --rm yolact:0.1 python3 eval.py --trained_model=./yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=/root/yolact/mnt/test.jpg:/root/yolact/mnt/output_image_yolact.png
Back