Build docker cho môi trường chạy Mask R-CNN

Cấu trúc thư mục

Dockerfile
FROM nvcr.io/nvidia/tensorflow:20.03-tf1-py3
ENV NVIDIA_VISIBLE_DEVICES all
ENV http_proxy=http://proxy.srv.cc.nttcom.co.jp:8080/
ENV https_proxy=http://proxy.srv.cc.nttcom.co.jp:8080/
ENV no_proxy=localhost,127.0.0.1
RUN DEBIAN_FRONTEND=noninteractive apt-get update
WORKDIR /engine
COPY ./Mask_RCNN/ /engine
RUN python setup.py install

RUN apt-get install -y libsm6 libxext6 libxrender-dev
RUN pip install opencv-python scikit-image keras==2.0.8 imgaug

docker-compose.yml
version: "3.3"
services:
   engine:
       build:
          context: .
          dockerfile: Dockerfile
       volumes:
            - "./Mask_RCNN/:/engine"
       ports:
            - "8889:8888"
       command: tail -f /dev/null

Build image
docker-compose up -d --build
Run jupyter notebook
docker-compose run -p 8889:8888 engine jupyter notebook
hoặc là
docker-compose run --service-ports engine jupyter notebook
Sau đó access vào http://127.0.0.1:8889 trên host

Tận hưởng kết quả nào, have fun!

@href:
https://qiita.com/zembutsu/items/9e9d80e05e36e882caaa?fbclid=IwAR2efkx_8BQPWJilylOQKxhDAJqJYfniqOfWymDS0onUVsA1j_CpPok5pFo

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *