# AIGO demo #### use FAIR (Facebook)'s '```detetron2``` for a demo of instance segmentation 1. Pull the image back to your host system: ```bash docker pull moeaidb/aigo:cu10.1-dnn7.6-gpu-pytorch-cv-19.12 ``` 2. Output the versions of installed packages/libs: ```bash rogerhu@honghutech:~$ docker run -it --rm moeaidb/aigo:cu10.1-dnn7.6-gpu-pytorch-cv-19.12 versions_summary System INFO: Python v3.7.5 NVIDIA Driver v430.26 CUDA v10.1.243-1 cuDNN v7.6.5.32-1+cuda10.1 NCCL v2.4.8-1+cuda10.1 Installed Python3 Packages: [Base]: torch v1.3.0a0+ee77ccb torchvision v0.4.2 apex v0.1 horovod v0.18.2 mpi4py v3.0.3 numba v0.46.0 [Numerical]: numexpr v2.7.0 numpy v1.17.4 scipy v1.3.3 [Data Science]: sklearn v0.20.4 pandas v0.25.3 matplotlib v3.1.2 seaborn v0.9.0 bokeh v1.4.0 jupyterlab v1.2.3 pyodbc v4.0.27 yacs v0.1.6 [NLP]: [CV]: cv2 v3.4.8 imgaug v0.3.0 pydicom v1.2.2 skimage v0.16.2 detectron2 v0.1 ``` You can see that ```detectron2```(v0.1) was installed. 3. let's start jupyterlab: ```bash # 決定Jupyterlab該監聽本機的哪一 個port host_port=9999 # 啟動容器並取得容器ID container_id=$(nvidia-docker run --rm -d -p ${host_port}:8888 -v $PWD:/workspace moeaidb/aigo:cu10.1-dnn7.6-gpu-pytorch-cv-19.12) # 休息一會,靜待容器服務啟動 # 等待服務啟動 sleep 2. # 擷取容器的Jupyterlab token notebook_token=$(docker logs ${container_id} 2>&1 | grep -nP "(LabApp.*token=).*" | cut -d"=" -f 2) # 顯示連線至Jupyterlab服務的網址 printf "Open a browser and connect to:\n http://[your_ip]:${host_port}/?token=${notebook_token}\n " ``` you'll see the following message: ``` rogerhu@honghutech:~$ printf "Open a browser and connect to:\n > http://[your_ip]:${host_port}/?token=${notebook_token}\n > " Open a browser and connect to: http://[your_ip]:9999/?token=25f4c1a3570380b27ab610f5b8f0d6e58516601d1b2f4537 25f4c1a3570380b27ab610f5b8f0d6e58516601d1b2f4537 ``` 5. Let's open a browser and go to: http://192.168.50.104:9999/?token=[the_token_you_have_got] 6. goto ```/demo_aigo/demo_detectron.ipynb``` and then execute the notebook.