chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:58 +08:00
commit b16403ea71
789 changed files with 115226 additions and 0 deletions
@@ -0,0 +1,15 @@
import asyncio
from e2b import AsyncTemplate, default_build_logger
from template import template
async def main():
await AsyncTemplate.build(
template,
"complex-python-app-dev",
on_build_logs=default_build_logger(),
)
if __name__ == "__main__":
asyncio.run(main())
@@ -0,0 +1,15 @@
import asyncio
from e2b import AsyncTemplate, default_build_logger
from template import template
async def main():
await AsyncTemplate.build(
template,
"complex-python-app",
on_build_logs=default_build_logger(),
)
if __name__ == "__main__":
asyncio.run(main())
@@ -0,0 +1,20 @@
from e2b import AsyncTemplate
template = (
AsyncTemplate()
.from_image("python:3.11-slim")
.set_user("root")
.set_workdir("/")
.run_cmd("apt-get update && apt-get install -y gcc g++ make libpq-dev && rm -rf /var/lib/apt/lists/*")
.set_envs({
"PYTHONDONTWRITEBYTECODE": "1",
"PYTHONUNBUFFERED": "1",
})
.run_cmd("useradd -m -u 1000 appuser")
.set_workdir("/app")
.copy("requirements.txt", ".")
.run_cmd("pip install --upgrade pip && pip install -r requirements.txt")
.copy("app.py", ".")
.set_user("appuser")
.set_start_cmd("sudo gunicorn --bind 0.0.0.0:8000 app:application", "sleep 20")
)