Skip to content

Commit b0c9ca6

Browse files
committed
add uv dependency manager and update devcontainer (<- test codespace)
1 parent c8959a4 commit b0c9ca6

File tree

10 files changed

+614
-49
lines changed

10 files changed

+614
-49
lines changed

.devcontainer/devcontainer.json

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,47 @@
1-
{
2-
"name": "Multi Agent Custom Automation Engine Solution Accelerator",
3-
"image": "mcr.microsoft.com/devcontainers/javascript-node:20-bullseye",
4-
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6-
},
7-
"ghcr.io/azure/azure-dev/azd:latest": {},
8-
"ghcr.io/devcontainers/features/azure-cli:1": {}
9-
},
10-
"customizations": {
11-
"vscode": {
12-
"extensions": [
13-
"dbaeumer.vscode-eslint",
14-
"esbenp.prettier-vscode",
15-
"GitHub.vscode-github-actions",
16-
"ms-azuretools.azure-dev",
17-
"ms-azuretools.vscode-azurefunctions",
18-
"ms-azuretools.vscode-bicep",
19-
"ms-azuretools.vscode-docker",
20-
"ms-vscode.js-debug",
21-
"ms-vscode.vscode-node-azure-pack"
22-
]
23-
}
24-
},
25-
"forwardPorts": [3000, 3100],
26-
"remoteUser": "node",
27-
"hostRequirements": {
28-
"memory": "8gb"
29-
}
30-
}
1+
{
2+
"name": "Multi Agent Custom Automation Engine Solution Accelerator",
3+
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bullseye",
4+
"features": {
5+
"ghcr.io/devcontainers/features/azure-cli:1": {},
6+
"ghcr.io/devcontainers/features/node:1": {},
7+
"ghcr.io/dhoeric/features/hadolint:1": {},
8+
"ghcr.io/azure/azure-dev/azd:latest": {},
9+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
10+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
11+
"version": "latest",
12+
"installDockerBuildx": true
13+
}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"ms-python.python",
19+
"ms-azuretools.vscode-azcli",
20+
"dbaeumer.vscode-eslint",
21+
"esbenp.prettier-vscode",
22+
"GitHub.vscode-github-actions",
23+
"ms-azuretools.azure-dev",
24+
"ms-azuretools.vscode-azurefunctions",
25+
"ms-azuretools.vscode-bicep",
26+
"ms-azuretools.vscode-docker",
27+
"ms-vscode.js-debug",
28+
"ms-vscode.vscode-node-azure-pack"
29+
]
30+
}
31+
},
32+
"forwardPorts": [
33+
3000,
34+
3100
35+
],
36+
"containerEnv": {
37+
"DISPLAY": "dummy",
38+
"PYTHONUNBUFFERED": "True",
39+
"UV_LINK_MODE": "copy",
40+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv"
41+
},
42+
"postCreateCommand": "bash ./.devcontainer/setupEnv.sh",
43+
"remoteUser": "vscode",
44+
"hostRequirements": {
45+
"memory": "8gb"
46+
}
47+
}

.devcontainer/setupEnv.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
#!/bin/bash
22

3-
pip install --upgrade pip
3+
# pip install --upgrade pip
4+
echo "Setting up Python environment in backend"
5+
cd ./src/backend
6+
uv sync --frozen
47

8+
cd ../../
59

6-
(cd ./src/frontend; pip install -r requirements.txt)
10+
echo "Setting up Python environment in frontend"
11+
cd ./src/frontend
12+
uv sync --frozen
713

14+
cd ../../
815

9-
(cd ./src/backend; pip install -r requirements.txt)
16+
echo "dependency setup completed."
17+
18+
# (cd ./src/frontend; pip install -r requirements.txt)
19+
20+
21+
# (cd ./src/backend; pip install -r requirements.txt)
1022

1123

src/backend/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

src/backend/Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Base Python image
2-
FROM python:3.11-slim
3-
4-
5-
# Backend app setup
6-
WORKDIR /src/backend
7-
COPY . .
8-
# Install dependencies
9-
RUN pip install --no-cache-dir -r requirements.txt
10-
EXPOSE 8000
11-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
1+
# Base Python image
2+
FROM python:3.13-slim
3+
4+
5+
# Backend app setup
6+
WORKDIR /src/backend
7+
COPY . .
8+
# Install dependencies
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
EXPOSE 8000
11+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]

src/backend/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[project]
2+
name = "backend"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"autogen-ext[azure]>=0.5.3",
9+
]

src/backend/uv.lock

Lines changed: 510 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/frontend/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

src/frontend/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM python:3.11-slim AS frontend
2-
WORKDIR /frontend
3-
COPY . .
4-
RUN pip install --no-cache-dir -r requirements.txt
5-
EXPOSE 3000
1+
FROM python:3.13-slim AS frontend
2+
WORKDIR /frontend
3+
COPY . .
4+
RUN pip install --no-cache-dir -r requirements.txt
5+
EXPOSE 3000
66
CMD ["uvicorn", "frontend_server:app", "--host", "0.0.0.0", "--port", "3000"]

src/frontend/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[project]
2+
name = "frontend"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = []

src/frontend/uv.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)