Fresh Install of a Mask-RCNN Environment on the Google Cloud Platform
Fresh MRCNN Installation Instructions
-
ssh into the gcloud instance
-
Install the conda environment. Here are the instructions. Only follow till step 8, as making the conda environment will require a specific instruction.
-
Download the Matterport implementation of the Mask-RCNN library
git clone https://github.com/matterport/Mask_RCNN.git
-
Change directory to Mask_RCNN
cd Mask_RCNN
-
Download the
working-gpu.txt
filewget https://github.com/matterport/Mask_RCNN/files/3870791/working-gpu.txt
-
Create the conda environment using the file flag
conda create --name <env-name> --file working-gpu.txt
-
Activate the conda environment
conda activate <env-name>
-
Run the setup script
python3 setup.py install
-
Check for GPU details.
nvidia-smi
(If the above fails)
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-driver-418
(Check again)
nvidia-smi
-
Make a data directory for gcsfuse to connect your training data bucket to
cd ~ && mkdir data
Notes
-
If you’re having ipython/jupyter notebook issues since it is using the wrong python kernel, read here
-
If you’re having version compatibilty issues for keras, tensorflow, etc.. follow this matrix:
Keras | Tensorflow | Tensorflow-GPU | cuDNN | cuda-toolkit | nvidia-drivers |
---|---|---|---|---|---|
2.0.8 | 1.14 | 1.14 | 7.4 | 10.1 | 418.39 |
-
If the python script using the GPU was terminated but the GPU still hasn’t cleared its memory check your GPU processes
sudo fuser -v /dev/nvidia*
The output will look something like
USER PID ACCESS COMMAND /dev/nvidia0: root 1256 F...m Xorg username 2057 F...m nvidia-persis... username 20699 F...m python
Terminate the python process
sudo kill -9 PID