Here you can find the information of using InstantDL with docker.
first you need to download the repository. After that, being in the main folder, simply run
sudo docker/bin/docker_build_context.sh
sudo docker build --tag=instantdl:0.0.1 buildFor runnig the docker, first you need to create the data folder as exaplined in the examples. In case, you would like to pretrained weights as well, first create a folder called logs under the data folder and simply put the .hdf5 file in the folders. After that, set all the parameters according to the documentation EXCEPT path and pretrained_weights, and save the parameters as config.json in the data folder.
IMPORTANT NOTE: For the config file, in the json file, these parameters data and pretrained_weights should BE ALWAYS:
{
...
"path": "/data/",
"pretrained_weights": "/data/logs/pretrained_weights_Lung_SemanticSegmentation.hdf5",
...
}The reason for this is that the folder will be mounted to the docker with the address /data/
This is a folder structure of the data folder:
PATH_TO_DATA
├── train
│ ├── image
│ │ ├── 000003-num1.png
│ │ ├── .
│ │ └── 059994-num1.png
│ └── groundtruth
│ └── groundtruth.csv
│
├── test
│ ├── image
│ │ ├── 000002-num1.png
│ │ ├── .
│ │ └── 009994-num1.png
│ └── groundtruth
│ └── groundtruth.csv
├── logs
│ └── weights.hdf5
|
|
└── config.json
Runnig the code with GPU
docker run --gpus all -v PATH_TO_DATA/:/data -it instantdl:0.0.1 /bin/bashStarting the docker containter terminal
docker run --gpus all -v PATH_TO_DATA/:/data -it instantdl:0.0.1 /bin/bashIn case you do not have GPU, you can omit the --gpus all.
We are using the docker from tensorflow. To Check if a GPU is available:
lspci | grep -i nvidiaVerify your nvidia-docker installation:
sudo docker run --gpus all --rm nvidia/cuda nvidia-smiRemove all containers and images:
docker system prune -a- add cuda and gpu
- add how to create data