Elixir Environment

Setup

Build Environment

Add erlang repo.

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
dpkg -i erlang-solutions_1.0_all.deb
rm erlang-solutions_1.0_all.deb

Install build tools and dependencies.

apt-get -qq update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends \
  build-essential gfortran cmake automake libtool libltdl-dev pkg-config \
  libsqlite3-dev libzmq3-dev \
  libcurl4-openssl-dev libncurses5-dev libncursesw5-dev \
  libblas-dev liblapack-dev libatlas-base-dev \
  libssl-dev libxslt1-dev unixodbc-dev libsctp-dev libwxgtk3.0-dev \
  esl-erlang elixir
apt-get clean
rm -r /var/lib/apt/lists/* # Clear package list so it isn't stale

Install Jupyter.

pip install --upgrade jupyter jupyter_client

Grab IElixir source.

git clone https://github.com/pprzetacznik/IElixir.git

Install and compile deps, then compile IElixir.

cd IElixir
mix local.hex --force
mix local.rebar --force
mix deps.get
mix deps.compile
mix test
MIX_ENV=prod mix compile

Install the kernel.

cd /IElixir
./install_script.sh

Check.

du -hsx /
elixir --version
jupyter kernelspec list

Testing

send self(), {:elixir, "Rocks!"}

receive do 
  {:elixir, msg} -> ["Elixir", msg]
after 
 1_000 -> :ok
end 
["Elixir", "Rocks!"]