Environment setup#
Configure Your Development Environment
Set up your local machine for SKAO development. Choose container-based development (recommended) or local installation.
Choose Your Setup Path#
Your development environment depends on the type of work you do. Container-based development is recommended when possible, but you may need to develop locally or remotely over SSH.
Two main approaches:
Local development — Install tools directly on Ubuntu 22.04
Container development — Use Docker for isolated, reproducible environments (recommended)
Local Development Setup#
Install Base System Packages#
Install python3 venv, Git, and build tools on Ubuntu 22.04:
sudo apt install git python3-venv build-essential
Configure Git#
Set your global Git configuration:
git config --global user.name "Your Name"
git config --global user.email "Your Institutional Email"
Set Python 3 as Default#
sudo apt install python-is-python3
Install Poetry#
Poetry manages Python dependencies. Install with:
curl -sSL https://install.python-poetry.org | python3 -
Check the Poetry official documentation for details.
Install Docker#
Follow the Official Docker documentation for Ubuntu installation. Complete the linux post-install instructions to run Docker without sudo.
Configure VS Code#
VS Code is the recommended IDE. Install these required extensions:
Recommended extensions:
GitLens
Jupyter
Makefile Tools
YAML
Note
PyCharm is also used by SKAO developers, but some features for remote and container development require the paid version.
Container Development Setup#
Container-based development manages dependencies and versioning inside the project. Use Docker or Podman to run containers (Docker is more mature and better tested).
Prerequisites#
Before starting, ensure you have:
Docker installed (see Install Docker above)
VS Code installed with extensions
Basic familiarity with VS Code — complete the First Steps tutorials if needed
Clone and Open the Project#
Clone the ska-tango-examples repository:
git clone --recurse-submodules https://gitlab.com/ska-telescope/ska-tango-examples.git
Open VS Code from inside the project folder:
cd ska-tango-examples && code .
Build the Application Image (Optional)#
Start a terminal session in VS Code (Terminal → New Terminal), then build:
make oci-build
This step is optional — the make interactive command below handles it automatically if needed.
Start the Container and Debug#
Start the container interactively:
make interactive
Debug a file using the vscode-debug.sh utility:
./vscode-debug.sh powersupply/powersupply.py
The terminal displays “Waiting for debugger attachment.” Press F5 or click the debug button in VS Code to attach.
Troubleshooting#
make interactive fails
If docker containers remain running in the background after improper disconnection:
docker ps # Check running containers
docker kill CONTAINER_NAME # Kill background containers
Tango Development Environment#
Many SKAO teams work on Tango devices and device servers.
Using Minikube#
For Kubernetes-based development:
Deploy minikube on your local machine
Follow the Tango Examples Project instructions
Your system will have a Minikube Kubernetes deployment running the Tango operator with examples you can modify.
Local Installation with Poetry#
For simpler local development, use a virtual environment:
poetry new my-tango-project
poetry add pytango
poetry shell
Check the PyTango documentation for more information.