opam-version: "2.0" maintainer: "Liang Wang " authors: [ "Liang Wang" ] license: "MIT" homepage: "https://github.com/owlbarn/owl" dev-repo: "git+https://github.com/owlbarn/owl.git" bug-reports: "https://github.com/owlbarn/owl/issues" doc: "https://owlbarn.github.io/" build: [ [ "dune" "subst" ] {dev} [ "dune" "build" "-p" name "-j" jobs ] ] depends: [ "ocaml" {>= "4.06.0" & < "5.0.0"} "alcotest" {with-test} "base-bigarray" "dune" ] synopsis: "An OCaml Numerical Library" description: """ Owl is an emerging numerical library for scientific computing and engineering. The library is developed in the OCaml language and inherits all its powerful features such as static type checking, powerful module system, and superior runtime efficiency. Owl allows you to write succinct type-safe numerical applications in functional language without sacrificing performance, significantly reduces the cost from prototype to production use. Behind the scene, Owl builds the advanced numerical functions atop of its solid implementation of n-dimensional arrays. Quite different from other libraries, algorithmic differentiation and distributed computing have been included as integral components in the core library to maximise developers' productivity. Owl is young but grows fast, the current features include: * N-dimensional array (both dense and sparse) * Various number types: `float32`, `float64`, `complex32`, `complex64`, `int8`, `int16`, `int32` ... * Linear algebra and full interface to CBLAS and LAPACKE * Algorithmic differentiation (or automatic differentiation) * Neural network module for deep learning applications * Dynamic computational graph allowing greatest flexibility for applications * Parallel and Distributed engine (map-reduce, parameter server, etc.) * Advanced math and stats functions (e.g., hypothesis tests, MCMC, etc.) * Zoo system for efficient scripting and code sharing * GPU support (work in progress ...) You can reach us in the following ways, looking forward to hearing from you! - [Email Me](mailto:liang.wang@cl.cam.ac.uk) - [Slack Channel](https://join.slack.com/t/owl-dev-team/shared_invite/enQtMjQ3OTM1MDY4MDIwLTA3MmMyMmQ5Y2U0NjJiNjI0NzFhZDAwNGFhODBmMTk4N2ZmNDExYjZiMzI2N2M1MGNiMTUyYTQ5MTAzZjliZDI) ## Learning Owl's documentation contains a lot of learning materials to help you start. The full documentation consists of two parts: [Tutorial Book](http://www.cl.cam.ac.uk/~lw525/owl/chapter/index.html) and [API Reference](http://www.cl.cam.ac.uk/~lw525/owl/apidoc/index.html). Both are perfectly synchronised with the code in the repository by the automatic building system. You can access both parts with the following link. * [Owl's Full Documentation](http://www.cl.cam.ac.uk/~lw525/owl/) ## Installation Owl requires OCaml `>=4.06.0`. The installation is rather trivial. There are four possible ways to try out Owl, as shown below, from the most straightforward one to the least one. ### Option 1: Install from OPAM You can simply type the following in the command line to start. ```bash opam install owl ``` Owl's current version on OPAM is `0.2.9`, and it lags way behind the master branch (current `0.3.4`) and misses many new features. If you want to try the newest version, I recommend the other three ways to install. ### Option 2: Pull from Docker Hub You only need to pull in [Owl's docker image](https://hub.docker.com/r/owlbarn/owl/) and start a container, then play with it in `utop`. The source code is stored in `/root/owl` directory. ```bash docker pull owlbarn/owl docker run -t -i owlbarn/owl ``` There are several Linux distributions provided including an [ARM-based Ubuntu](https://github.com/owlbarn/owl/blob/master/docker/Dockerfile.ubuntu.arm). You can pull in a specific Owl image with corresponding tags. ```bash docker pull owlbarn/owl:ubuntu docker pull owlbarn/owl:debian docker pull owlbarn/owl:alpine docker pull owlbarn/owl:centos docker pull owlbarn/owl:opensuse docker pull owlbarn/owl:fedora ``` All these images are perfectly synced with the master branch by automatic building. You can check the building history on [Docker Hub](https://hub.docker.com/r/owlbarn/owl/builds/). ### Option 3: Pin the Dev-Repo `opam pin` allows us to pin the local code to Owl's development repository on Github. The first command `opam depext` installs all the dependencies Owl needs. ```bash opam depext owl opam pin add owl --dev-repo ``` ### Option 4: Compile from Source First, you need to clone the repository. ```bash git clone git@github.com:owlbarn/owl.git ``` or with ```bash git clone https://github.com/owlbarn/owl.git ``` Second, you need to figure out the missing dependencies and install them. ```bash jbuilder external-lib-deps --missing @install ``` Last, this is perhaps the most classic step. ```bash make && make install ``` ### CBLAS/LAPACKE Dependency The most important dependency is [OpenBLAS](https://github.com/xianyi/OpenBLAS). Linking to the correct OpenBLAS is the key to achieve the best performance. Depending on the specific platform, you can use `yum`, `apt-get`, `brew` to install the binary format. For example on Mac OSX, ```bash brew install openblas ``` However, installing from OpenBLAS source code leads to way better performance in my own experiment. In future, the dependency on OpenBLAS should also be resolved by `opam` automatically. ### Integration to Toplevel Owl is well integrated with `utop`. You can use `utop` to try out the experiments in our tutorials. If you want `utop` to automatically load Owl for you, you can also edit `.ocamlinit` file in your home folder by adding the following lines. (Note that the library name is `owl` with lowercase `o`.) ```bash""" url { src: "https://github.com/owlbarn/owl/releases/download/0.4.0/owl-0.4.0.tbz" checksum: [ "sha256=098c648b481469761f46854c9825d52c1afdd273307658489af9c3df4ab7624b" "md5=164fbec1c8025895eea703b125dd35f3" ] }