Arulkumar03/Fox_Sheep_Detector_Computer_Vision_model
0
1 2## Use the container (with docker ≥ 19.03)3 4```5cd docker/6# Build:7docker build --build-arg USER_ID=$UID -t detectron2:v0 .8# Launch (require GPUs):9docker run --gpus all -it \10 --shm-size=8gb --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \11 --name=detectron2 detectron2:v012 13# Grant docker access to host X server to show images14xhost +local:`docker inspect --format='{{ .Config.Hostname }}' detectron2`15```16 17## Use the container (with docker-compose ≥ 1.28.0)18 19Install docker-compose and nvidia-docker-toolkit, then run:20```21cd docker && USER_ID=$UID docker-compose run detectron222```23 24## Use the deployment container (to test C++ examples)25After building the base detectron2 container as above, do:26```27# Build:28docker build -t detectron2-deploy:v0 -f deploy.Dockerfile .29# Launch:30docker run --gpus all -it detectron2-deploy:v031```32 33#### Using a persistent cache directory34 35You can prevent models from being re-downloaded on every run,36by storing them in a cache directory.37 38To do this, add `--volume=$HOME/.torch/fvcore_cache:/tmp:rw` in the run command.39 40## Install new dependencies41Add the following to `Dockerfile` to make persistent changes.42```43RUN sudo apt-get update && sudo apt-get install -y vim44```45Or run them in the container to make temporary changes.46 