Docker for training TensorFlow Object Detection API Verison 1 models.
107
git clone https://github.com/tensorflow/models.git
# From the root of the git repository
docker build -f research/object_detection/dockerfiles/tf1/Dockerfile -t od .
docker run -it od
cd models/research
# Compile protos.
protoc object_detection/protos/*.proto --python_out=.
# Install TensorFlow Object Detection API.
cp object_detection/packages/tf1/setup.py .
python -m pip install --use-feature=2020-resolver .
# Test the installation.
python object_detection/builders/model_builder_tf1_test.py
When you try to run the object detection api pipeline, you will run into the following error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Some of the required libraries are missing in the default docker therefore we need to run the following:
apt update && apt install -y libsm6 libxext6 ffmpeg libfontconfig1 libxrender1 libgl1-mesa-glx
The docker that you have just build is a user docker hence you will not be allowed to install packages directly. You need to 'exec' the docker as root in another terminal (this assumes that a docker container is still running. If you are not sure how to run this docker, the instructions to do so are below)
docker exec -it --user="root" <docker name> bash
docker commit <docker name> <docker image>:<tag>
docker pull anujonthemove/tensorflow_od_api_v1:v1.15
/home of your Ubuntudocker run -it --rm --name tf_1_od_api --gpus all -it -v $(pwd):/tf -v /path/to/another/shared/location:/home/tensorflow/models/research/mount/ od:latest
/home ensures that you can access all your folders inside this dockerAnd that's it!
Please reach out to me on my email: [email protected] for any other queries.
Content type
Image
Digest
Size
2.7 GB
Last updated
about 5 years ago
docker pull anujonthemove/tensorflow_od_api_v1:v1.15