A development container is a running Docker container with a well-defined tool/runtime stack and its prerequisites. The VS Code Remote - Containers extension allows you to clone a repository or open any folder mounted into (or already inside) a dev container and take advantage of VS Code's full development feature set.
The well-defined tool/runtime stack in this VS Code Remote container is:
- ESA's SNAP EO Toolbox
- SNAP snappy Python bindings
- snapista, a SNAP Python thin layer on top of snappy for creating and running SNAP GPT processing graphs
- Python development support tools such as flake8, black, mypy, etc.
To get started, follow these steps:
-
Install and configure Docker for your operating system.
Windows / macOS:
-
Install Docker Desktop for Windows/Mac.
-
Right-click on the Docker task bar item, select Settings / Preferences and update Resources > File Sharing with any locations your source code is kept. See tips and tricks for troubleshooting.
-
If you are using WSL 2 on Windows, to enable the Windows WSL 2 back-end: Right-click on the Docker taskbar item and select Settings. Check Use the WSL 2 based engine and verify your distribution is enabled under Resources > WSL Integration.
Linux:
-
Follow the official install instructions for Docker CE/EE for your distribution. If you are using Docker Compose, follow the Docker Compose directions as well.
-
Add your user to the
docker
group by using a terminal to run:sudo usermod -aG docker $USER
-
Sign out and back in again so your changes take effect.
-
-
On Windows set the environment variable
HOME
-
Under
$HOME
create two folders:data
andresults
-
Install Visual Studio Code
-
Install the Remote Development extension pack.
-
Run
Remote-Containers: Clone Repository in Container Volume...
from the Command Palette (F1) -
Add the URL to this git repository:
https://github.com/snap-contrib/vscode-remote-snap.git
-
Select the Volume mode
-
Wait a few minutes for the build to complete
-
Download and extract the Sentinel-1 product S1A_IW_GRDH_1SDV_20201228T170552_20201228T170617_035889_0433FB_D8C7 acquisition to
$HOME/data
-
Run the
inspect_s1.py
python script
See https://code.visualstudio.com/docs/python/jupyter-support-py to learn about using interactive Python with Visual Studio Code