Platform Compatibility

Currently DynaML installs and runs on *nix platforms.


  • sbt
  • A modern HTML5 enabled browser (to view plots generated by Wisp)
  • BLAS, LAPACK and ARPACK binaries for your platform. In case they are not installed, it is possible to disable this feature by commenting out (//) the section of the build.sbt file given below.
  "org.scalanlp" % "breeze-natives_2.11" % "0.11.2" % "compile",


Using the install script

There are two scripts for building DynaML.

  • This builds the binary and adds a symlink to the system path (sudo priviledges needed).
  • This starts the sbt shell, for build/compile/test workflows.
$ ./ 8096m and both take three parameters.

  1. The JVM heap size to use for the packaged executable (defaults to 4096m).
  2. Whether to use GPU accelerated tensorflow (defaults to False).
  3. Whether to use a user compiled/built tensorflow library (True) or a pre-packaged one (False, the default).


TensorFlow Nvidia GPU support

If you want to use Nvidia GPU acceleration when DynaML calls TensorFlow, giving the appropriate flags to or should work, but in order for your GPU to be actually utilised, you must ensure that:

  • Your Nvidia GPU is compliant, i.e. has a compute capability of atleast 4.1

  • Cuda v9.0 is installed on your system and its installation location is added to LD_LIBRARY_PATH bash variable.

  • cuDNN v7 is installed on your system and is appended to LD_LIBRARY_PATH

Using user compiled TensorFlow

By default, DynaML uses the Tensorflow dynamic library bundled with TensorFlow Scala distribution, but it is possible for the user to build Tensorflow from source for their platform. For example, to use DynaML with Cuda 10.0, we would need to build the tensorflow binary with Cuda 10.x, add it to LD_LIBRARY_PATH and build DynaML with the corresponding flag set to True. In most applications, the bundled TensorFlow is adequate for user requirements.


  1. Clone the repository.
$ git clone
  1. Use the sbt shell launcher

    # Build with GPU support and use user-built 
    # Tensorflow binary (accessible in LD_LIBRARY_PATH)
    $ ./ 8096m True True

    The sbt shell will open

    [info] Loading project definition from ~/DynaML/project
    [info] Set current project to DynaML
  2. Build the source

  3. After the project builds, exit from the sbt console and execute the DynaML start script from the bash shell. Make sure you have execute permissions on the DynaML start script.

    $ ./target/universal/stage/bin/dynaml

    You should see the prompt.

    Welcome to DynaML v2.0-SNAPSHOT 
    Interactive Scala shell for Machine Learning Research
    Currently running on:
    (Scala 2.12.10 Java 11.0.7)