Last active
October 26, 2019 11:30
-
-
Save bgalvao/a3968b5829e6a33db091edfe5983357a to your computer and use it in GitHub Desktop.
tensorflow object detection api install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM tensorflow/tensorflow:latest-gpu-py3 | |
# add some dependencies | |
RUN apt install protobuf-compiler git -y | |
RUN pip3 install Cython contextlib2 pillow lxml matplotlib jupyter jupyterlab | |
# add tf od api | |
RUN git clone https://github.com/tensorflow/models.git --depth 1 | |
# add coco metrics | |
RUN git clone https://github.com/cocodataset/cocoapi.git --depth 1 | |
WORKDIR cocoapi/PythonAPI | |
RUN make | |
RUN cp -r pycocotools ../../models/research/ | |
# configure env | |
WORKDIR ../../models/research | |
RUN protoc object_detection/protos/*.proto --python_out=. | |
RUN export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim | |
# test install | |
WORKDIR object_detection | |
#RUN python3 object_detection/builders/model_builder_test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove docker docker-engine docker.io containerd runc -y | |
sudo apt update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt update | |
sudo apt install docker-ce docker-ce-cli containerd.io -y | |
sudo docker run hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit | |
sudo systemctl restart docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment