Advertisement
This is comment for paste
Detectron2 Dockerfile cuda124
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1. save this file into folder named: `docker` in the name `Dockerfile`
- # 2. install docker desktop (for windows)
- # 3. from `cmd` run:
- cd docker
- docker build -t detectron2:v0 .
- docker run --gpus all -d --shm-size=12gb -p 5001:5001 --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --name=detectron2 detectron2:v0
- # and to test is from your PC execute the command:
- curl -X POST -F "image=@path/to/your/input.jpg" http://localhost:5001/detect -o output.jpg
- ------------------------- Cheat-sheet: ---------------------------
- # Build:
- docker build -t detectron2:v0 .
- # Launch new container from the built docker image (require GPUs):
- docker run --gpus all -it --shm-size=12gb -p 5001:5001 --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --name=detectron2 detectron2:v0
- # launch the existing container:
- docker start detectron2
- # Connect to the Container in Interactive Mode:
- docker exec -it detectron2 /bin/bash
- # create a linux wheel file for detectron2:
- cd /home/tron2/detectron2_repo/
- python3 setup.py bdist_wheel
- # created file will be at:
- /home/tron2/detectron2_repo/dist/detectron2-0.6-cp311-cp311-linux_x86_64.whl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement