Software Setup
This class will use Jupyter notebooks with the Almond Scala 2 kernel. This is needed to read the lecture notes and solve weekly assignments. Jupyter notebooks allows you to write small Scala snippets that are standalone and run them through an interpreter in the backend. We will use Docker to set up the development environment. Please follow the instructions to set things up on you local machines.
- Download and install Docker Desktop.
- Start Docker Desktop on your machine.
- Create a directory where are all the Jupyter notebooks for this course will live. Lets assume that the directory is named
cs454
. - Copy this Dockerfile in directory
cs454
. - Open a terminal window and go to the directory
cs454
. Then rundocker build -t cs454 .
. This will create a Docker image namedcs454
. This Docker image will have all the relevant software installed including Java 11, Scala 2.13, Jupyter, and the Almond Scala kernel. - Start a Docker container using this image by running the following command in the terminal and under the same directory:
docker run -d --rm --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -p 8012:8012 -v <full path to cs454 directory>:/home/cs454 cs454
- Open a browser and go to http://127.0.0.1:8012/. You should see the Juypter interface with a list of all the files and directories in the
cs454
directory. Open the notebook that you would like to read or edit. If you edit, make sure to save the notebook. - To exit, close the browser. To stop the Docker container, first, run the following command in the terminal window:
docker container ls
. This should list all running containers along with their CONTAINER IDs. To stop a container, use the command:docker container stop <CONTAINER ID>
.