Skip to content

Installation

Platform Compatibility

Currently DynaML installs and runs on *nix platforms, though it is possible to build the project on windows, running the generated .bat file might not work and one would need to resort to using the java -jar command.

Pre-requisites

  • 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.
1
  "org.scalanlp" % "breeze-natives_2.11" % "0.11.2" % "compile",

Note

TensorFlow Nvidia GPU support

If you want to use Nvidia GPU acceleration when DynaML calls TensorFlow, you must build DynaML with a small modification to project/Dependencies.scala

1
val gpuFlag: Boolean = true

The rest of the procedure for installation remains the same as shown below. But in order for your GPU to be actually utilised, you must take care to confirm 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. In this situation, you can make another modification to project/Dependencies.scala.

1
val packagedTFFlag: Boolean = false

In most applications, the bundled TensorFlow is adequate for user requirements, and since building it from source is a time consuming affair, its advisable for users to start with the bundled TensorFlow library and compile it themselves only if absolutely necessary.

Steps

  1. Clone this repository
  2. Run the following.

    1
    sbt
    

    The sbt shell will open

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

    1
    stage
    
  4. 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.

    1
    ./target/universal/stage/bin/dynaml
    

    You will get the following prompt.

    1
    2
    3
    4
    Welcome to DynaML v1.4.1-beta.3
    Interactive Scala shell for Machine Learning Research
    (Scala 2.11.8 Java 1.8.0_101)
    DynaML>
    

Tip

Using the install script

If you have already installed the pre-requisites, you can use the install.sh to build DynaML. It will add the a symlink to thedynaml executable in the /usr/local/bin directory.

You will need sudo access for install.sh to run correctly.

1
./install.sh

Comments