-
Notifications
You must be signed in to change notification settings - Fork 24
Setup JupyterLab Coding Environment
In this unit we will setup the JupyterLab Coding environment, which is necessary to complete the Jupyter Notebook exercises.
- Contents
- Clone
acdc-notebooks
Repository - Install Docker
- Download Docker Images
- Start Docker Container
- Start the JupyterLab introduction notebook
Start a terminal on your Linux/WSL/MacOS system and navigate to a directory where you want to store the acdc-notebooks
repository. If you have never used a Unix-Shell (terminal) before, we strongly suggest you to do an online tutorial before you start this course.
We suggest you to navigate to the directory ~/Documents
which is located in your ~/home
directory and clone the acdc-notebooks
repository there with the following command
git clone https://github.com/ika-rwth-aachen/acdc-notebooks.git
- Note that you can clone the repository to any directory on your machine you want. This might be
~/Documents/acdc-notebooks
or~/acdc-notebooks
or some other directory.
After cloning, your local acdc-notebooks
directory should have the same contents like you can see in the following:
.
├── assets
├── docker
│ ├── docker_build.sh
│ ├── Dockerfile
│ ├── docker_push.sh
│ ├── docker_run.sh
│ ├── docker_run_tests.sh
│ └── requirements.txt
├── index.ipynb
├── README.md
├── section_1_introduction_and_ros
│ ├── 1_introduction_to_python_and_jupyter_notebooks.ipynb
│ ├── 2_introduction_to_numpy.ipynb
│ ├── 3_introduction_to_ros1.ipynb
│ ├── 4_message_visualization_ros1.ipynb
│ ├── 5_sensordata_visualization_ros1.ipynb
│ ├── 6_unified_robot_description_format_ros1.ipynb
│ └── images
├── section_2_sensor_data_processing
│ ├── 1_semantic_image_segmentation.ipynb
│ ├── 2_augmentation_semantic_image_segmentation.ipynb
│ ├── 3_semantic_pcl_segmentation.ipynb
│ ├── 4_semantic_pcl_segmentation_boosting.ipynb
│ ├── 5_object_detection.ipynb
│ ├── 6_grid_mapping.ipynb
│ ├── 7_cam_semantic_grid_mapping.ipynb
| ├── 8_localization.ipynb
│ ├── datasets
│ ├── grid_mapping
│ ├── ipm_assets
| ├── localization
│ ├── object_detection
│ ├── object_detection_pretrained_model
│ ├── point_pillars_repo
│ ├── segmentation_utils
│ └── tensorflow_datasets
├── section_3_data_fusion
├── section_4_vehicle_guidance
│ ├── 1_route_planning.ipynb
│ ├── maps
│ └── route_planning_utils.py
└── section_5_connected_driving
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers are a standardized unit of software that allows developers to isolate their application from its environment and distribute safely it to any other environment. For the ACDC course, we created such a standardized container that allows every student to run our code without any manual installations of libraries or other programs. The requirements to use our container are an installation of Docker Version 19.03 or later.
For the installation of docker, we refer to the official installation guide:
- Ubuntu: https://docs.docker.com/engine/install/ubuntu/
- MacOS: https://docs.docker.com/desktop/install/mac-install/
- Test your installation of docker with
sudo docker run hello-world
-
Note that you will have to execute the docker commands with root-privileges (
sudo
) if you have not added your user to a docker group https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user - Now it should work without
sudo
(You need to restart your machine after the previous step):docker run hello-world
For the ACDC Notebook exercises we already created and compiled a container and uploaded it to Dockerhub. Dockerhub is a public registry where it is possible to upload and download docker images. You can find the docker image that is necessary for executing this repository in the following link
All libraries to run the notebooks are already compiled into the image and you can simply download it and use it on your linux machine. You can pull (download) the image with the following command
docker pull rwthika/acdc-notebooks:latest
This might need some time, depending on your internet connection. Also make sure, that you Linux/MacOS system has enough disk space available.
Navigate to the local directory ${REPOSITORY}/docker
and execute ./run.sh
. This will start an Docker container instance based on the Docker image rwthika/acdc-notebooks:latest
, in which all required libraries are preinstalled. You can stop the container by pressing Ctrl+C in the terminal. If everything is setup correctly you will see the following:
The run script will invoke jupyter lab
and a unique link is created for your personal Jupyter Hub instance that is now running on your machine. You will see something like the following output:
To access the server, open this file in a browser:
file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html
Or copy and paste one of these URLs:
http://85149ed6c0bf:8888/lab?token=3441575a9ce46b834f6cc5423f37f4234a522d655d7e6d74
or http://127.0.0.1:8888/lab?token=3441575a9ce46b834f6cc5423f37f4234a522d655d7e6d74
Now you can click on the last links which will open a new window with JupyterLab in your browser.
Note, the whole acdc-notebooks
folder is mounted from your host file system into the container. That means, all changes in the source codes or Jupyter Notebooks or other files are mirrored into the container, and vice-versa!
Perfect! Your JupyterLab is now setup. You can now navigate with file manager to the directory acdc
and start with your first coding task.
Use the JupyterLab environment to navigate to the directory section_1_introduction_and_ros
then open the notebook 1_introduction_to_python_and_jupyter_notebooks.ipynb
to start with an optional introduction to JupyterLab, Jupyter Notebooks and Python. You should see something like in the following image. This exercise is optional and only recommended if you do not have any exdpierences with JupyterLab, Jupyter Notebooks and Python.