This was inspired by this article:
https://realpython.com/pyscript-python-in-browser/
docker container stop pyscript ; docker container rm pyscript
docker container run -d -v $PWD:/tmp/zfoo -p 8000:8000 --name pyscript ubuntu:22.04 sleep inf
docker container exec -i -w /tmp/zfoo pyscript /bin/bash <<'eof'
apt-get update
apt-get -y dist-upgrade
apt-get install -y python3-pip vim tree jq less wget curl
wget https://pyscript.net/alpha/pyscript.{css,js,py}
eof
docker container exec -i -w /tmp/zfoo pyscript /bin/bash <<'eof'
<<'eof2' cat > hw.v01.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello, World!</title>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
<py-script>print("Hello, World!")</py-script>
</body>
</html>
eof2
<<'eof2' cat > hw.v02.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello, World!</title>
<link rel="stylesheet" href="/pyscript.css" />
<script defer src="/pyscript.js"></script>
</head>
<body>
<py-script>print("Hello, World!")</py-script>
</body>
</html>
eof2
eof
docker container exec -w /tmp/zfoo pyscript python3 -m http.server
file:///$PWD/hw.v01.html
http://localhost:8000/hw.v02.html
docker container exec -w /tmp/zfoo pyscript python3 -m http.server