Currently DynaML installs and runs on *nix platforms.
- 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.sbtfile given below.
"org.scalanlp" % "breeze-natives_2.11" % "0.11.2" % "compile",
Using the install script
There are two scripts for building DynaML.
install.sh: This builds the binary and adds a symlink to the system path (sudo priviledges needed).
sbt-shell.sh: This starts the sbt shell, for build/compile/test workflows.
$ ./install.sh 8096m
install.sh both take three parameters.
- The JVM heap size to use for the packaged executable (defaults to
- Whether to use GPU accelerated tensorflow (defaults to False).
- 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
sbt-shell.sh 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
cuDNN v7 is installed on your system and is appended to
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
LD_LIBRARY_PATH and build DynaML with the corresponding flag set to True. In most
applications, the bundled TensorFlow is adequate for user requirements.
- Clone the repository.
$ git clone https://github.com/transcendent-ai-labs/DynaML.git
Use the sbt shell launcher
# Build with GPU support and use user-built # Tensorflow binary (accessible in LD_LIBRARY_PATH) $ ./sbt-shell.sh 8096m True True
The sbt shell will open
[info] Loading project definition from ~/DynaML/project [info] Set current project to DynaML sbt:DynaML>
Build the source
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.
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) DynaML>