Free dev/prototyping JupyterLab environment for Data Science, ML on Ampere powered machines on Oracle Cloud…

Kiril Aleksovski
2 min readJun 10, 2021
Image credit: wallpaperup.com
Image credit: wallpaperup.com

You can read the announcement here: https://blogs.oracle.com/cloud-infrastructure/arm-based-cloud-computing-is-the-next-big-thing-introducing-arm-on-oci

One important excerpt for us is: “To start you can access the industry’s most generous free tier offering with 4 cores and 24 GB of RAM of Ampere A1 Compute as part of our Always Free tier. Just sign up here, and you’ll get this along with more than 20 great Always Free services like 200 GB of block storage, 2 Autonomous Databases, and more.”

All you need is to spin up the VM with Oracle Linux Cloud Developer image which comes with preinstalled container tools, Instant Client, Maven, Eclipse, Terraform, Buildah, and Ansible…

Choose the VM shape to be a VM.Standard.A1.Flex and customize a number of OCPUs and RAM from 1–4 and up to 24GB of memory.

Since it is difficult to find a pre-built container image for JupyterLab on ARM64 you have to build one yourself. Since the VM comes with pre-installed container tools like podman and buildah no need to worry about installing them.

Dockerfile would look like this:

FROM arm64v8/ubuntu
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
ENV DEBIAN_FRONTEND=noninteractive
RUN mkdir notebooks
WORKDIR /notebooks
RUN apt-get update && apt-get -y update
RUN apt-get install -y build-essential bzip2 wget
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
RUN bash Miniconda3-latest-Linux-aarch64.sh -b && rm -f Miniconda3-latest-Linux-aarch64.sh
RUN conda install pip
RUN conda update --all
RUN eval "$(~/miniconda3/bin/conda shell.bash hook 2> /dev/null)"
RUN conda init bash
RUN exec "/usr/bin/bash"
RUN pip install jupyterlab
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
EXPOSE 8888
CMD ["jupyter", "lab", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]

Of course, this can be further slimmed down and optimized, but that is for later.

Then just simply run:

podman build -t jupyterlab:latest .podman run --name=jupyterlab -d -p 0.0.0.0:8890:8888 jupyterlab

Add appropriate firewall rules for the port number used, grab the public IP for the VM and enjoy your jupyter env!

--

--

Kiril Aleksovski

Data engineer with background in Database management