How To use Docker in the Labs

What is Docker, and why have we started using it?

We have moved many modules into Docker for the 24/25 academic year.

Docker is a platform which allows developers to create and share containers.

A container is an environment separate from your main operating system, which includes all of the requirements to run a piece of software. You can think of it like a box which you can take anywhere, and when opened, the software inside works exactly the same way, no matter where you are running it.

This helps us technicians to give every module the exact coding environment it needs, without causing any conflicts.

This guide will teach you how to use Docker in VS Code for the modules which use it. Check the list below to see if this applies to you.

How do I use Docker in VS Code?

1. Log on to a Lab PC.

2. On the Desktop, find and open the folder entitled ‘Docker Containers’.

3. Search this folder’s contents to find a VS Code shortcut for your module.

4. Run the shortcut, and the directory containing the Docker container for your module will be opened in VS Code.

5. In the bottom right hand corner of the VS Code window, click the pop-up which says ‘Reopen in container’. If this does not appear, press F1, search ‘Reopen in container’, and run.

6. The Docker container will now be downloaded and launched. You can verify it has worked by looking for this icon in the bottom left corner.

7. You can now open the test.ipynb file, (if it exists) to verify the container is working. This file is a Jupyter Notebook, the same as you may have used in the past, just running in VS Code instead.

Sometimes you need to select which Python kernel to use when using Jupyter Notebooks. Click ‘Select Kernel’ in the top right of your jupyter notebook, then click ‘Python Environments’ and select Python 3.12.5.

Sometimes the correct python version to use is not the recommended version, so be careful to select the correct one.

8. You are now ready to do workshops and assignments for your module in the labs!

9. You can also use these Docker containers at home to ensure you have the exact same development environment! Visit github.com/socstech and search our repositories for your module.

If you have any issues using these development environments, please contact your module coordinator or demonstrators during workshops, or EPS Technicians at lncn.ac/labsupport.

Which Modules use Docker?

VS Code Dev Containers

The following modules use Docker by running a development container in VS Code:

  • CMP1905 – Foundations of Data Science
  • CMP2028 – Natural Language Processing
  • CMP2020 – Artificial Intelligence
  • CMP3103/CMP9050 – Autonomous Mobile Robotics
  • CMP3751/CMP9772 – Machine Learning
  • CMP3749/CMP9770 – Big Data
  • CMP9794 – Advanced Artificial Intelligence
  • CMP9780 – Applied Signal and Image Processing
  • CMP9065 – Data Programming in Python
  • AGR9013 – Introduction to Data Mining
  • CMP9783 – Neural Computing
  • CMP9137 – Advanced Machine Learning
  • CMP9764 – Advanced Robotics
  • CMP9134 – Advanced Software Engineering
  • CMP9135 – Computer Vision
  • CMP9139 – Research Methods
  • CMP9781 – Big Data Analytics and Methods
  • ROB1001 – Collaboration in Robotics
  • ROB2002 – Evaluation for Robotics 

Other Containerised Modules

The following modules use Docker by running containers in the background and accessing the containers using a web browser or other application:

  • CMP2806 – Scalable Database Systems
  • CMP2808 – Cloud Computing
  • CMP9790 – Cloud Computing and Administration
  • CMP9791 – Cloud Data Platforms and Tools
  • CMP9141 – Web Service Design and Development
  • CMP9785 – Cloud Development

For guidance on how to use the software in the labs for these modules, please check the module content on Blackboard for a guide, or contact the module coordinator.

Troubleshooting

I am having issues launching Docker

You will need to make sure Docker is running in the background, for the lab machines: you can find Docker Desktop, from the start menu on Windows. And on Linux, it will run in the background.

If you’re using your own device, make sure you have Docker installed. For Windows and macOS, you will need Docker desktop. For Linux, we recommend just installing Docker Engine.

If it is already installed, check you are a member of the docker (for Linux) or docker-users (for windows) group. If you have had to join the group, you will need to log out and log back into to see the changes.

If these steps do not work, please Contact Us.

I do not want to use VS Code

Good news, Devcontainers (the tool we are using to launch the session) is an open standard released by the VS Code team and is based on top of the Open Container Initiative. Meaning that if your preferred editor supports devcontainers — you can use it.

However, this is something that the technicians team will be unable to support, and you may not have as good of an experience compared to inside of VS Code.

It is highly recommended that you use VS Code to ensure that you have a consistent experience.