Uses PaddleSeg (documentation).
Uses PyTorch 2.5.1, CUDA 11.8 and PaddleSeg 2.10.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/paddleseg:2.10.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/paddleseg:2.10.0_cuda11.8
-
Build the image from Docker file (from within /path_to/paddleseg/2.10.0_cuda11.8)
docker build -t paddleseg .
-
Run the container
docker run --gpus=all --shm-size 8G --net=host -v /local/dir:/container/dir -it paddleseg
/local/dir:/container/dir
maps a local disk directory into a directory inside the container
docker build -t paddleseg:2.10.0_cuda11.8 .
-
Tag
docker tag \ paddleseg:2.10.0_cuda11.8 \ public-push.aml-repo.cms.waikato.ac.nz:443/paddle/paddleseg:2.10.0_cuda11.8
-
Push
docker push public-push.aml-repo.cms.waikato.ac.nz:443/paddle/paddleseg:2.10.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 \ paddleseg:2.10.0_cuda11.8 \ waikatodatamining/paddleseg:2.10.0_cuda11.8
-
Push
docker push waikatodatamining/paddleseg:2.10.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/paddleseg:2.10.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 ...
PaddleSeg 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 /some/where/cache:/.paddleseg \
The following additional scripts are available:
paddleseg_export_config
- for exporting template config files and setting parameters (calls the/opt/PaddleSeg/tools/export_config.py
script)paddleseg_train
- for training models (calls the/opt/PaddleSeg/tools/train.py
script)paddleseg_export
- for exporting models (calls the/opt/PaddleSeg/tools/export.py
script)paddleseg_val
- for evaluating models (calls the/opt/PaddleSeg/tools/val.py
script)paddleseg_predict
- for generating predictions of supplied files (calls the/opt/PaddleSeg/tools/predict.py
script)paddleseg_predict_poll
- for generating predictions of supplied files in batch/poll mode (calls the/opt/PaddleSeg/tools/predict_poll.py
script)paddleseg_predict_redis
- for generating predictions via Redis (calls the/opt/PaddleSeg/tools/predict_redis.py
script)