Skip to content

Docker: TensorFlow with MIVisionX

Kiriti Gowda edited this page Jan 11, 2021 · 1 revision

Docker - TensorFlow + MIVisionX for Training

Steps to create docker for TensorFlow training with MIVisionX RALI:

  1. Pull latest rocm/tensorflow docker
sudo docker pull rocm/tensorflow:rocm3.7-tf1.15-dev
  1. Run all steps under Python Package Installation
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
  1. Clone MIVisionX. Run the setup script with '--neural_net off' option.
git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX
cd MIVisionX
python MIVisionX-setup.py --neural_net off
  1. Build and install MIVisionX. Comment out lines for find_package - miopen and miopengemm - in MIVisionX/amd_openvx_extensions/CMakeLists.txt and MIVisionX/apps/CMakeLists.txt
cd MIVisionX
mkdir build
cd build
cmake ../
make -j
sudo make install
  1. Setup rali_pybind
sudo ./run.sh
  1. Install TensorFlow hub
pip3 isntall tensorflow_hub
  1. Commit and save the new docker state
sudo docker commit <container ID> <new_image_name:tag_name>
sudo docker push <new_image_name:tag_name>