Graphviz Sierra

Indicate your preferred configuration. Then, follow the customized commands to install MXNet.

The following installation instructions have been tested on Ubuntu 14.04 and 16.04.

UPDATE: Let me document what I did to get the real issue resolved, namely, I wanted to use PlantUML inside of VS Code on a Mac OS platform running High Sierra. Because I didn't see any way to add a command-line switch for MacOS, I focused on how to set the environment variable (GRAPHVIZDOT) at the start of VS Code execution. OSX Sierra, Python 2.7, Graphviz 2.38. Using pip install graphviz and conda install graphviz BOTH resolves the problem. Dec 31, 2020 WINDOWS SOFTWARE REQUIREMENTS. Microsoft Windows Operating System, Vista or higher. Microsoft Excel, Version 2007 or higher. Graphviz, Version 2.41.1, published 2020- MAC SOFTWARE REQUIREMENTS. macOS Operating System, 10.13.6 (High Sierra) or higher. Microsoft Excel, Version 16.41 (Office 365) or higher. Graphviz, Version 2.41.1.


Step 1 Install virtualenv for Ubuntu.

Step 2 Create and activate virtualenv environment for MXNet.

Following command creates a virtualenv environment at ~/mxnet directory. However, you can choose any directory by replacing ~/mxnet with a directory of your choice.

Activate the virtualenv environment created for MXNet.

After activating the environment, you should see the prompt as below.

Step 3 Install MXNet in the active virtualenv environment.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command.

Install MXNet with OpenBLAS acceleration.

Step 4 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 5 Validate the installation by running simple MXNet code described here.

Graphviz Sierra Leone

Note You can read more about virtualenv here.


Step 1 Install prerequisites - wget and latest pip.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command in the terminal.

Step 2 Install MXNet with OpenBLAS acceleration.

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 4 Validate the installation by running simple MXNet code described here.

Experimental Choice If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL:


Docker images with MXNet are available at Docker Hub.

Step 1 Install Docker on your machine by following the docker installation instructions.

Note - You can install Community Edition (CE) to get started with MXNet.

Step 2 [Optional] Post installation steps to manage Docker as a non-root user.

Follow the four steps in this docker documentation to allow managing docker containers without sudo.

If you skip this step, you need to use sudo each time you invoke Docker.

Step 2 Pull the MXNet docker image.

You can list docker images to see if mxnet/python docker image pull was successful.

Step 3 Validate the installation by running simple MXNet code described here.


Building MXNet from source is a 2 step process.

  1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
  2. Build the language specific bindings. Example - Python bindings, Scala bindings.

Minimum Requirements

  1. GCC 4.8 or later to compile C++ 11.


Build the MXNet core shared library

Step 1 Install build tools and git.

Step 2 Install OpenBLAS.

MXNet uses BLAS and LAPACK libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - OpenBLAS, ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

Step 3 Install OpenCV.

MXNet uses OpenCV for efficient image loading and augmentation operations.

Step 4 Download MXNet sources and build MXNet core shared library.

Note - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in make/config.mk.


Build the MXNet Python binding

Step 1 Install prerequisites - python, setup-tools, python-pip and numpy.

Step 2 Install the MXNet Python binding.

Note that the -e flag is optional. It is equivalent to --editable and means that if you edit the source files, these changes will be reflected in the package installed.

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 4 Validate the installation by running simple MXNet code described here.

The following installation instructions have been tested on Ubuntu 14.04 and 16.04.

Prerequisites

Install the following NVIDIA libraries to setup MXNet with GPU support:

  1. Install CUDA 8.0 following the NVIDIA’s installation guide.
  2. Install cuDNN 5 for CUDA 8.0 following the NVIDIA’s installation guide. You may need to register with NVIDIA for downloading the cuDNN library.

Note: Make sure to add CUDA install path to LD_LIBRARY_PATH.

Example - export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH


Step 1 Install prerequisites - wget and latest pip.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command in the terminal.

Step 2 Install MXNet with GPU support using CUDA 8.0

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 4 Validate the installation by running simple MXNet code described here.

Experimental Choice If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL:


Step 1 Install virtualenv for Ubuntu.

Step 2 Create and activate virtualenv environment for MXNet.

Following command creates a virtualenv environment at ~/mxnet directory. However, you can choose any directory by replacing ~/mxnet with a directory of your choice.

Activate the virtualenv environment created for MXNet.

After activating the environment, you should see the prompt as below.

Step 3 Install MXNet in the active virtualenv environment.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command.

Install MXNet with GPU support using CUDA 8.0.

Step 4 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 5 Validate the installation by running simple MXNet code described here.

Note You can read more about virtualenv here.


Docker images with MXNet are available at Docker Hub.

Step 1 Install Docker on your machine by following the docker installation instructions.

Note - You can install Community Edition (CE) to get started with MXNet.

Step 2 [Optional] Post installation steps to manage Docker as a non-root user.

Follow the four steps in this docker documentation to allow managing docker containers without sudo.

If you skip this step, you need to use sudo each time you invoke Docker.

Step 3 Install nvidia-docker-plugin following the installation instructions. nvidia-docker-plugin is required to enable the usage of GPUs from the docker containers.

Step 4 Pull the MXNet docker image.

You can list docker images to see if mxnet/python docker image pull was successful.

Step 5 Validate the installation by running simple MXNet code described here.


Building MXNet from source is a 2 step process.

  1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
  2. Build the language specific bindings. Example - Python bindings, Scala bindings.

Minimum Requirements

  1. GCC 4.8 or later to compile C++ 11.


Build the MXNet core shared library

Step 1 Install build tools and git.

Step 2 Install OpenBLAS.

MXNet uses BLAS and LAPACK libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - OpenBLAS, ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

Step 3 Install OpenCV.

Sierra

MXNet uses OpenCV for efficient image loading and augmentation operations.

Step 4 Download MXNet sources and build MXNet core shared library.

Note - USE_OPENCV, USE_BLAS, USE_CUDA, USE_CUDA_PATH AND USE_CUDNN are make file flags to set compilation options to use OpenCV, OpenBLAS, CUDA and cuDNN libraries. You can explore and use more compilation options in make/config.mk. Make sure to set USE_CUDA_PATH to right CUDA installation path. In most cases it is - /usr/local/cuda.


Install the MXNet Python binding

Step 1 Install prerequisites - python, setup-tools, python-pip and numpy.

Step 2 Install the MXNet Python binding.

Note that the -e flag is optional. It is equivalent to --editable and means that if you edit the source files, these changes will be reflected in the package installed.

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 4 Validate the installation by running simple MXNet code described here.

The following installation instructions have been tested on OSX Sierra and El Capitan.


Step 1 Install prerequisites - Homebrew, python development tools.

Step 2 Install virtualenv for macOS.

Step 3 Create and activate virtualenv environment for MXNet.

Following command creates a virtualenv environment at ~/mxnet directory. However, you can choose any directory by replacing ~/mxnet with a directory of your choice.

Activate the virtualenv environment created for MXNet.

After activating the environment, you should see the prompt as below.

Step 4 Install MXNet in the active virtualenv environment.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command.

Install MXNet with OpenBLAS acceleration.

Step 5 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 6 Validate the installation by running simple MXNet code described here.

Note You can read more about virtualenv here.


Step 1 Install prerequisites - Homebrew, python development tools.

Step 2 Install MXNet with OpenBLAS acceleration.

Installing MXNet with pip requires a latest version of pip. Install the latest version of pip by issuing the following command.

Step 3 Install Graphviz. (Optional, needed for graph visualization using mxnet.viz package).

Step 4 Validate the installation by running simple MXNet code described here.


Docker images with MXNet are available at Docker Hub.

Step 1 Install Docker on your machine by following the docker installation instructions.

Note - You can install Community Edition (CE) to get started with MXNet.

Step 2 Pull the MXNet docker image.

You can list docker images to see if mxnet/python docker image pull was successful.

Step 4 Validate the installation by running simple MXNet code described here.


Prerequisites

If not already installed, download and install Xcode (or insall it from the App Store) for macOS. Xcode is an integrated development environment for macOS containing a suite of software development tools like C/C++ compilers, BLAS library and more.


Building MXNet from source is a 2 step process.

  1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
  2. Build the language specific bindings. Example - Python bindings, Scala bindings.

Make sure you have installed Xcode before proceeding further.


All the instructions to build MXNet core shared library and MXNet Python bindings are compiled as one helper bash script. You can use this bash script to build MXNet for Python, from source, on macOS.

Step 1 Download the bash script for building MXNet from source.

Step 2 Run the script to get latest MXNet source and build.

Step 3 Validate the installation by running simple MXNet code described here.

More details and verified installation instructions for macOS, with GPUs, coming soon.

MXNet is expected to be compatible on macOS with NVIDIA GPUs. Please install CUDA 8.0 and cuDNN 5.0, prior to installing GPU version of MXNet.

AWS Marketplace distributes AMIs (Amazon Machine Image) with MXNet pre-installed. You can launch an Amazon EC2 instance with one of the below AMIs:

  1. Deep Learning AMI (Amazon Machine Image) for Ubuntu
  2. Deep Learning AMI for Amazon Linux

You could also run distributed deeplearning with MXNet on AWS using Cloudformation Template.

The CPU version of MXNet R package can be installed in R like other packages

Will be available soon.


Building MXNet from source is a 2 step process.

  1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
  2. Build the language specific bindings.

Minimum Requirements

  1. GCC 4.8 or later to compile C++ 11.


Build the MXNet core shared library

Step 1 Install build tools and git.

Step 2 Install OpenBLAS.

MXNet uses BLAS and LAPACK libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - OpenBLAS, ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

Step 3 Install OpenCV.

MXNet uses OpenCV for efficient image loading and augmentation operations.

Step 4 Download MXNet sources and build MXNet core shared library.

Note - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in make/config.mk.


Build and install the MXNet R binding

The following installation instructions have been tested on Ubuntu 14.04 and 16.04.

Prerequisites

Install the following NVIDIA libraries to setup MXNet with GPU support:

  1. Install CUDA 8.0 following the NVIDIA’s installation guide.
  2. Install cuDNN 5 for CUDA 8.0 following the NVIDIA’s installation guide. You may need to register with NVIDIA for downloading the cuDNN library.

Note: Make sure to add CUDA install path to LD_LIBRARY_PATH.

Example - export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH


Building MXNet from source is a 2 step process.

  1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
  2. Build the language specific bindings.

Minimum Requirements

  1. GCC 4.8 or later to compile C++ 11.


Build the MXNet core shared library

Step 1 Install build tools and git.

Step 2 Install OpenBLAS.

MXNet uses BLAS and LAPACK libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - OpenBLAS, ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

Step 3 Install OpenCV.

MXNet uses OpenCV for efficient image loading and augmentation operations.

Step 4 Download MXNet sources and build MXNet core shared library.

Note - USE_OPENCV, USE_BLAS, USE_CUDA, USE_CUDA_PATH AND USE_CUDNN are make file flags to set compilation options to use OpenCV, OpenBLAS, CUDA and cuDNN libraries. You can explore and use more compilation options in make/config.mk. Make sure to set USE_CUDA_PATH to right CUDA installation path. In most cases it is - /usr/local/cuda.


Build and install the MXNet R binding

The CPU version of MXNet R package can be installed in R like other packages

The GPU version of MXNet R package can be installed in R like other packages

Alternatively, You can also follow the installation instructions in this guide to build MXNet from source.

Follow the installation instructions in this guide to set up MXNet.

Follow the installation instructions in this guide to set up MXNet.

Follow the installation instructions in this guide to set up MXNet.

MXNet supports the Debian based Raspbian ARM based operating system so you can run MXNet on Raspberry Pi Devices.

These instructions will walk through how to build MXNet for the Raspberry Pi and install the Python bindings for the library.

The complete MXNet library and its requirements can take almost 200MB of RAM, and loading large models with the library can take over 1GB of RAM. Because of this, we recommend running MXNet on the Raspberry Pi 3 or an equivalent device that has more than 1 GB of RAM and a Secure Digital (SD) card that has at least 4 GB of free memory.

Install MXNet

Installing MXNet is a two-step process:

  1. Build the shared library from the MXNet C++ source code.
  2. Install the supported language-specific packages for MXNet.

Graphviz Sierra Vista

Step 1 Build the Shared Library

On Raspbian versions Wheezy and later, you need the following dependencies:

  • Git (to pull code from GitHub)
  • libblas (for linear algebraic operations)
  • libopencv (for computer vision operations. This is optional if you want to save RAM and Disk Space)
  • A C++ compiler that supports C++ 11. The C++ compiler compiles and builds MXNet source code. Supported compilers include the following:

Install these dependencies using the following commands in any directory:

Clone the MXNet source code repository using the following git command in your home directory:

If you aren’t processing images with MXNet on the Raspberry Pi, you can minimize the size of the compiled library by building MXNet without the Open Source Computer Vision (OpenCV) library with the following commands:

Otherwise, you can build the complete MXNet library with the following command:

Executing either of these commands start the build process, which can take up to a couple hours, and creates a file called libmxnet.so in the mxnet/lib directory.

If you are getting build errors in which the compiler is being killed, it is likely that the compiler is running out of memory (especially if you are on Raspberry Pi 1, 2 or Zero, which have less than 1GB of RAM), this can often be rectified by increasing the swapfile size on the Pi by editing the file /etc/dphys-swapfile and changing the line CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024, then running:

Step 2 Install MXNet Python Bindings

To install python bindings run the following commands in the MXNet directory:

Note that the -e flag is optional. It is equivalent to --editable and means that if you edit the source files, these changes will be reflected in the package installed.

You are now ready to run MXNet on your Raspberry Pi device. You can get started by following the tutorial on Real-time Object Detection with MXNet On The Raspberry Pi.

Note - Because the complete MXNet library takes up a significant amount of the Raspberry Pi’s limited RAM, when loading training data or large models into memory, you might have to turn off the GUI and terminate running processes to free RAM.

MXNet supports the Ubuntu Arch64 based operating system so you can run MXNet on NVIDIA Jetson Devices.

These instructions will walk through how to build MXNet for the Pascal based NVIDIA Jetson TX2 and install the corresponding python language bindings.

For the purposes of this install guide we will assume that CUDA is already installed on your Jetson device.

Install MXNet

Installing MXNet is a two-step process:

  1. Build the shared library from the MXNet C++ source code.
  2. Install the supported language-specific packages for MXNet.

Step 1 Build the Shared Library

You need the following additional dependencies:

  • Git (to pull code from GitHub)
  • libatlas (for linear algebraic operations)
  • libopencv (for computer vision operations)
  • python pip (to load relevant python packages for our language bindings)

Install these dependencies using the following commands in any directory:

Clone the MXNet source code repository using the following git command in your home directory:

Edit the Makefile to install the MXNet with CUDA bindings to leverage the GPU on the Jetson:

Edit the Mshadow Makefile to ensure MXNet builds with Pascal’s hardware level low precision acceleration by editing mshadow/make/mshadow.mk and adding the following after line 122:

Now you can build the complete MXNet library with the following command:

Executing this command creates a file called libmxnet.so in the mxnet/lib directory.

Step 2 Install MXNet Python Bindings

To install python bindings run the following commands in the MXNet directory:

Note that the -e flag is optional. It is equivalent to --editable and means that if you edit the source files, these changes will be reflected in the package installed.

Add the mxnet folder to the path:

You are now ready to run MXNet on your NVIDIA Jetson TX2 device.


Start the python terminal.

Launch a Docker container with mxnet/python image and run example MXNet python program on the terminal.

Activate the virtualenv environment created for MXNet.

After activating the environment, you should see the prompt as below.

Start the python terminal.

Run a short MXNet python program to create a 2X3 matrix of ones, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3.

Start the python terminal.

Launch a NVIDIA Docker container with mxnet/python:gpu image and run example MXNet python program on the terminal.

Activate the virtualenv environment created for MXNet.

After activating the environment, you should see the prompt as below.

Start the python terminal.

Run a short MXNet python program to create a 2X3 matrix of ones a on a GPU, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3. We use mx.gpu(), to set MXNet context to be GPUs.

More details and verified validation instructions for macOS, with GPUs, coming soon.

Exit the Python terminal.

Exit the Python terminal and Deactivate the virtualenv MXNet environment.

Exit the Python terminal and mxnet/python docker container.

Exit the Python terminal.

Exit the Python terminal and Deactivate the virtualenv MXNet environment.

Exit the Python terminal and then the docker container.

Login to the cloud instance you launched, with pre-installed MXNet, following the guide by corresponding cloud provider.

Start the python terminal.

Run a short MXNet python program to create a 2X3 matrix of ones, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3.

Exit the Python terminal.

Run a short MXNet python program to create a 2X3 matrix of ones a on a GPU, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3. We use mx.gpu(), to set MXNet context to be GPUs.

Run a short MXNet R program to create a 2X3 matrix of ones, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3.

Run a short MXNet R program to create a 2X3 matrix of ones a on a GPU, multiply each element in the matrix by 2 followed by adding 1. We expect the output to be a 2X3 matrix with all elements being 3. We use mx.gpu(), to set MXNet context to be GPUs.

The following installation instructions have been tested on Ubuntu 14.04 and 16.04.

Prerequisites

Install the following NVIDIA libraries to setup MXNet with GPU support:

  1. Install CUDA 8.0 following the NVIDIA’s installation guide.
  2. Install cuDNN 7 for CUDA 8.0 following the NVIDIA’s installation guide. You may need to register with NVIDIA for downloading the cuDNN library.

Note: Make sure to add CUDA install path to PATH.


Step 1 Install python.

Recommend install Anaconda3here

Step 2 Install MXNet with GPU support using CUDA 8.0


Graphviz Sierra County

To build and install MXNet yourself, you need the following dependencies. Install the required dependencies:
  1. If Microsoft Visual Studio 2015 is not already installed, download and install it. You can download and install the free community edition.
  2. Download and Install CMake if it is not already installed.
  3. Download and install OpenCV.
  4. Unzip the OpenCV package.
  5. Set the environment variable OpenCV_DIR to point to the OpenCVbuilddirectory.
  6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install OpenBlas.
  7. Set the environment variable OpenBLAS_HOME to point to the OpenBLAS directory that contains the include and lib directories. Typically, you can find the directory in C:Programfiles(x86)OpenBLAS.
  8. Download and install CuDNN. To get access to the download link, register as an NVIDIA community user.

After you have installed all of the required dependencies, build the MXNet source code:

  1. Download the MXNet source code from GitHub.
  2. Use CMake to create a Visual Studio solution in ./build.
  3. In Visual Studio, open the solution file,.sln, and compile it.These commands produce a library called mxnet.dll in the ./build/Release/ or ./build/Debug folder.
Next, we install graphviz library that we use for visualizing network graphs you build on MXNet. We will also install Jupyter Notebook used for running MXNet tutorials and examples.
  • Install graphviz by downloading MSI installer from Graphviz Download Page.Note Make sure to add graphviz executable path to PATH environment variable. Refer here for more details

Will be available soon.

Question or issue on macOS:

I’m having trouble while installing PyGraphviz.
I’m using Anaconda in Mac OS X.

Error messages indicates some reasons, but I already checked out it is installed in anaconda directory.

According to the error messages, How can I change the the include_dirs and library_dirs variables in setup.py??

Here is the error message that I meet

How to solve this problem?

Solution no. 1:

brew install graphviz

then:


pip install –install-option=”–include-path=/usr/local/include/” –install-option=”–library-path=/usr/local/lib/” pygraphviz
Both path in bold should NOT contain “graphviz”.

Worked for me on OSX 10.14.1

Solution no. 2:

Assuming that you’ve already installed graphviz software:

As described in this blog post use the following parameters whilst trying to run pip install pygraphviz

So the final command would look like pip install pygraphviz --install-option='--include-path=/usr/local/include/graphviz/' --install-option='--library-path=/usr/local/lib/graphviz'.

What this does is this explicitly specified where the libraries of the original program (graphviz) exist for the python extension to use. Unfortunately, this doesn’t seem to get automatically recognized.

Worked on MacOS Sierra with Python 3.6

Solution no. 3:

try the following (make sure to have anaconda-client installed and updated):

Solution no. 4:

Graphviz Sierra 1500

Graphviz can be installed via homebrew: brew install graphviz.

Then do:

Graphviz Sierra Vista

And finally:

Graphviz Server

Tested on Sierra and woks fine.

Graphviz Sierra Madre

Hope this helps!