Run dope4j-app from Docker container
CONTENT
Overview
dope4j-app CLI application can be run inside Docker container. That way installing all the dependencies (like TensorRT etc) is not required as dope4j image comes with them.
Build Docker image
To build dope4j image:
Run
Run:
docker run --gpus all -it \
-v <MAVEN_HOME>:/home/ubuntu/.m2 \
-v <MODELS_FOLDER>:/tmp/models \
-v <DOPE4J_PROJECT>/config:/tmp/dope4j/config \
-v <DATASET_FOLDER>:/tmp/dataset \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix dope4j
Where:
- MAVEN_HOME - usually it is located at home folder ~/.m2. It is not required but it helps to avoid downloading every time some of the Deep Java Library dependencies.
- DOPE4J_PROJECT - source repository location.
- DATASET_FOLDER - folder with images
Example
Start dope4j container:
docker run --gpus all -it \
-v ~/.m2:/home/ubuntu/.m2 \
-v ~/Deep_Object_Pose_Estimation/models:/tmp/models \
-v ~/dope4j/config:/tmp/dope4j/config \
-v ~/Deep_Object_Pose_Estimation/datasets/hope-dataset/hope_image_test:/tmp/dataset \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix dope4j
Inside the container make sure all folders are mounted properly:
ls -laR /tmp
For examples how to use dope4j-app please refer to dope4j-app documentation.