This template repository facilitates the development of Scala and Python Jupyter Notebooks. The template is containerized to facilitate using it on different Machines.
It works on PCs (AMD64) and Macs using the latest Apple Silicon architecture (ARM64).
You only need Docker.
- Make sure you have Docker installed and running.
- Copy the environment variables file
.env.example
to.env
Adjust the values as needed (see next section) - Build and Run with VS code
- If you use VS code, open the menu (bottom left corner), and select
Reopen in container
. This will build the docker image, run the container, and open the root directory. - Open any
ipynb
file in VScode and it will automatically open the Notebook view.
- If you use VS code, open the menu (bottom left corner), and select
- Build and Run manually
- If you prefer to build and run the container manually, you can use
docker-compose
.docker compose -f docker-compose.dev.yml up --build
- Once you've built it, you need to open another console, connect to the container.
docker compose -f docker-compose.dev.yml exec scala-docker-dev-env /bin/bash
- Run jupyter lab. After that, you can access it via a web browser.
jupyter lab --ip 0.0.0.0
- If you prefer to build and run the container manually, you can use
The .env
file contains the environment variables that can be adjusted according to your needs. The provided versions in the .env.example
file are the following:
- JAVA_VERSION=8
- SCALA_VERSION=2.12
- PYTHON_VERSION=3.9.6
- SPARK_VERSION=3.3.0
- HADOOP_VERSION=3
- ALMOND_VERSION=0.13.14
Modify the requirements.txt
file in the root of the repository to add the Python libraries that you want to install.
Using ivy from within the Notebooks, you can download the dependencies. See the examples.
The examples
directory contains Jupyter Notebook examples.