This repo includes a dev container descriptor at .devcontainer/devcontainer.json.
The workspace uses the external image referenced there, which is expected to provide Python 3.12 and uv.
- Python 3.12 +
uvin a workspace container - The repository itself provides:
- dependency management via
uv sync - test and lint commands documented in
Makefile - project renaming via
scripts/rename_project.py - documentation content under
docs/
- dependency management via
- Some workspace images may also provide convenience shell aliases such as
test,lint,format,run, ordocs-serve- those conveniences come from the external image or workspace environment, not from files tracked in this repository
- if those aliases are unavailable in your workspace, run the underlying commands directly instead
- Ensure VS Code is set up. This includes installing some necessary extensions, listed in the instructions.
- Prepare your machine
- On your local machine, install DevPod.
- Open DevPod and enter the URL of your project's GitHub repository, or point it to the local directory if you've already cloned the repo.
- Select Docker as the "Provider"
- If on Windows, edit the advanced options to specify the "Host" as
tcp://127.0.0.1:2375and change "Docker Path" to "podman".
- If on Windows, edit the advanced options to specify the "Host" as
- Select VS Code as your IDE
- Click Create - the dev container will be pulled down and started for you, and VS Code should open
- If you have trouble with this step on Windows, see Troubleshooting DevPod on Windows
- After the workspace starts, open a terminal in VS Code and run
uv sync --dev --all-extras
- Run tests
uv run pytest
- (Optional) Run the GUI
- Set up access to the container's desktop
- Run
uv run ap-python-starter-kit
- Install VS Code
- Open VS Code and navigate to the Extensions tab (icon looks like four squares, where the top-right square is rotated 45 degrees)
- In the search bar at the top, type "Dev Containers" and install the extension from Microsoft
- (Windows-only) Do the same as step 3, searching for and installing the "WSL" extension (also by Microsoft)
Mac users will run containers using the Docker-compatible OrbStack.
- Install OrbStack
- Start OrbStack by opening the app, or run in a terminal:
orb start
- During DevPod setup, follow the instructions for using Docker as your provider. OrbStack will be substituted by DevPod automatically.
If your local machine is running Windows, you will need to have Podman installed and set up to use Windows Subsystem for Linux as its unix runtime host.
- Run the following in a terminal with administrator rights (you may be asked to restart your machine)
wsl --install --no-distribution
- Ensure WSL has the latest kernel by running
wsl --update - Install Podman Desktop on Windows:
- Download and install Podman Desktop: https://podman-desktop.io/downloads/windows
- Open Podman Desktop after installing so it can finish first-time setup. It will walk you through creating a Podman Machine. Be sure to select the WSL2 integration during this step.
- Verify Podman is installed:
podman version
While building your app, you'll probably want to test out changes to the UI before deploying. In the container, this requires one preliminary step.
The development container comes with a minimal desktop overlay, in which your app will run when you kick it off. To see it, do the following:
- In VS Code, go to the "Ports" tab of the bottom panel (toggle the panel with the appropriate button in the very top-right if it is not already visible)
- Click the "Forward a Port" button
- Type
6080and hit Enter - If it doesn't open automatically, go to your web browser and navigate to
localhost:6080 - Click "Connect"
You're all set! Now when you run the app locally, it will come up in your web browser at localhost:6080.
- The template placeholders (
ap-python-starter-kit,ap_python_starter_kit, and similar values) are expected to be replaced when you generate a real project from this template.- The provided
scripts/rename_project.pycommand should do this for you.
- The provided
- If your DevPod or dev container image defines shell aliases that reference the placeholder project name, update that environment after renaming the project.
- This workspace intentionally uses an external dev container image for fast startup.
- The repo's Docker-based workflow is still available in
docs/container.mdfor building runnable images and the optional browser-served GUI (Xpra HTML) target.
- The repo's Docker-based workflow is still available in
After applying any of these fixes, be sure to fully stop Podman and DevPod (making sure their icons are not still present in the taskbar hidden icons menu) restart them, and then create a new DevPod workspace from scratch (starting from step 4 above)
Run in PowerShell to extend your path, replacing [your user] with your username:
[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\Users\[your user]\.local\bin", "User")Also try deleting any pre-existing C:\Users\[your user]\.docker folder, as this may interfere with the Podman configuration.
VS Code fails to connect to running workspace with Bad owner or permissions on C:\\Users\\[username]/.ssh/config error in terminal
Run in PowerShell to set the correct permissions for the SSH config folder:
icacls "$env:USERPROFILE\.ssh\config" /setowner "$env:USERNAME"
icacls "$env:USERPROFILE\.ssh\config" /inheritance:r /grant:r "${env:USERNAME}:(F)"