Uses PaddleDetection (documentation).
Uses PyTorch 2.5.1, CUDA 11.8 and PaddleDetection 2.8.0.
-
Log into registry using public credentials:
docker login -u public -p public public.aml-repo.cms.waikato.ac.nz:443
-
Pull and run image (adjust volume mappings
-v
):docker run --gpus=all --shm-size 8G --net=host \ -v /local/dir:/container/dir \ -it public.aml-repo.cms.waikato.ac.nz:443/paddle/paddledetection:2.8.0_cuda11.8
-
Pull and run image (adjust volume mappings
-v
):docker run --gpus=all --shm-size 8G --net=host \ -v /local/dir:/container/dir \ -it waikatodatamining/paddledetection:2.8.0_cuda11.8
-
Build the image from Docker file (from within /path_to/paddledetection/2.8.0_cuda11.8)
docker build -t paddledetection .
-
Run the container
docker run --gpus=all --shm-size 8G --net=host -v /local/dir:/container/dir -it paddledetection
/local/dir:/container/dir
maps a local disk directory into a directory inside the container
docker build -t paddledetection:2.8.0_cuda11.8 .
-
Tag
docker tag \ paddledetection:2.8.0_cuda11.8 \ public-push.aml-repo.cms.waikato.ac.nz:443/paddle/paddledetection:2.8.0_cuda11.8
-
Push
docker push public-push.aml-repo.cms.waikato.ac.nz:443/paddle/paddledetection:2.8.0_cuda11.8
If error "no basic auth credentials" occurs, then run (enter username/password when prompted):
docker login public-push.aml-repo.cms.waikato.ac.nz:443
-
Tag
docker tag \ paddledetection:2.8.0_cuda11.8 \ waikatodatamining/paddledetection:2.8.0_cuda11.8
-
Push
docker push waikatodatamining/paddledetection:2.8.0_cuda11.8
If error "no basic auth credentials" occurs, then run (enter username/password when prompted):
docker login
docker run --rm \
-it public.aml-repo.cms.waikato.ac.nz:443/paddle/paddledetection:2.8.0_cuda11.8 \
pip freeze > requirements.txt
When running the docker container as regular use, you will want to set the correct user and group on the files generated by the container (aka the user:group launching the container):
docker run -u $(id -u):$(id -g) -e USER=$USER ...
PaddleDetection will download pretrained models and cache them locally. To avoid having to download them constantly, you can the cache directory to the host machine:
-
when running the container as current user
-v `pwd`/cache:/.paddledetection \ -v `pwd`/cache/visualdl:/.visualdl \
The following additional scripts are available:
paddledet_train
- for training models (calls the/opt/PaddleDetection/tools/train.py
script)paddledet_eval
- for evaluating trained models (calls the/opt/PaddleDetection/tools/eval.py
script)paddledet_export_model
- for exporting trained models (calls the/opt/PaddleDetection/tools/export_model.py
script)paddledet_infer
- for simple inference using a trained model (calls the/opt/PaddleDetection/tools/infer.py
script)