OCRTOC / OCRTOC_software_package

67 stars 30 forks source link

create docker container #10

Closed QAbot-zh closed 2 years ago

QAbot-zh commented 2 years ago

hello,I want to build docker environment, and I have already executed the instruction: "docker pull registry.cn-hangzhou.aliyuncs.com/ocrtoc2021/release:2.1". When I want to execute "bash tools/create_container.sh" instruction to create docker container, what should I replace "$HOME/Desktop/docker" ?

sudo docker rm -f ocrtoc

sudo docker run -i -d --gpus all --name ocrtoc --network host \
        --privileged -v /dev:/dev -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 \
        -v /tmp/.X11-unix:/tmp/.X11-unix \
        -v $HOME/OCRTOC_software_package:/root/ocrtoc_ws/src \
        -v $HOME/Desktop/docker:/root/upload \
        registry.cn-hangzhou.aliyuncs.com/ocrtoc2021/release:2.1
sudo xhost +local:`docker inspect --format='{{ .Config.Hostname }}' ocrtoc`
GouMinghao commented 2 years ago

Thank you for your question!

The instruction -v $HOME/Desktop/docker:/root/upload will mount the directory $HOME/Desktop/docker of the local machine to /root/upload directory of the docker container.

This will be convenient for us when executing you solution because you may need to record some of the information for debugging. If you don't need that, you can remove this line.

QAbot-zh commented 2 years ago

Thank you for your reply! My problem has been solved.