File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
2+
3+ COPY requirements-dev.txt /tmp/pip-tmp/
4+ COPY requirements.txt /tmp/pip-tmp/
5+ COPY requirements-rag.txt /tmp/pip-tmp/
6+
7+ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements-dev.txt \
8+ && rm -rf /tmp/pip-tmp
Original file line number Diff line number Diff line change 22// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33{
44 "name" : " python-openai-demos (Azure OpenAI)" ,
5- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
6-
5+ "build" : {
6+ "dockerfile" : " Dockerfile" ,
7+ "context" : " .."
8+ },
79 "features" : {
810 "ghcr.io/devcontainers/features/azure-cli:latest" : {},
911 "ghcr.io/azure/azure-dev/azd:latest" : {}
1921
2022 // Add the IDs of extensions you want installed when the container is created.
2123 "extensions" : [
22- " ms-python.python" ,
23- " charliermarsh.ruff" ,
24- " ms-python.black-formatter"
24+ " ms-python.python"
2525 ]
2626 }
2727 },
2828
29- // Use 'postCreateCommand' to run commands after the container is created.
30- "postCreateCommand" : " pip3 install --user -r requirements-dev.txt" ,
31-
3229 // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3330 "remoteUser" : " vscode"
3431}
Original file line number Diff line number Diff line change 22// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33{
44 "name" : " python-openai-demos (GitHub models)" ,
5- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5+ "build" : {
6+ "dockerfile" : " Dockerfile" ,
7+ "context" : " .."
8+ },
69 "features" : {
710 },
811 // Configure tool-specific properties.
1619
1720 // Add the IDs of extensions you want installed when the container is created.
1821 "extensions" : [
19- " ms-python.python" ,
20- " charliermarsh.ruff" ,
21- " ms-python.black-formatter"
22+ " ms-python.python"
2223 ]
2324 }
2425 },
2526
2627 // Use 'postCreateCommand' to run commands after the container is created.
27- "postCreateCommand" : " pip3 install --user -r requirements-dev.txt && cp .env.sample.github .env" ,
28+ "postCreateCommand" : " cp .env.sample.github .env" ,
2829
2930 // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3031 "remoteUser" : " vscode"
Original file line number Diff line number Diff line change 22// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33{
44 "name" : " python-openai-demos (Ollama)" ,
5- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5+ "build" : {
6+ "dockerfile" : " Dockerfile" ,
7+ "context" : " .."
8+ },
69 "features" : {
710 "ghcr.io/prulloac/devcontainer-features/ollama:1" : {}
811 },
1720
1821 // Add the IDs of extensions you want installed when the container is created.
1922 "extensions" : [
20- " ms-python.python" ,
21- " charliermarsh.ruff" ,
22- " ms-python.black-formatter"
23+ " ms-python.python"
2324 ]
2425 }
2526 },
2627
2728 // Use 'postCreateCommand' to run commands after the container is created.
28- "postCreateCommand" : " pip3 install --user -r requirements-dev.txt && cp .env.sample.ollama .env && ollama pull llama3.1" ,
29+ "postCreateCommand" : " cp .env.sample.ollama .env && ollama pull llama3.1" ,
2930
3031 // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3132 "remoteUser" : " vscode" ,
Original file line number Diff line number Diff line change 22// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33{
44 "name" : " python-openai-demos (OpenAI.com)" ,
5- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5+ "build" : {
6+ "dockerfile" : " Dockerfile" ,
7+ "context" : " .."
8+ },
69 // Configure tool-specific properties.
710 "customizations" : {
811 // Configure properties specific to VS Code.
1417
1518 // Add the IDs of extensions you want installed when the container is created.
1619 "extensions" : [
17- " ms-python.python" ,
18- " charliermarsh.ruff" ,
19- " ms-python.black-formatter"
20+ " ms-python.python"
2021 ]
2122 }
2223 },
2324
2425 // Use 'postCreateCommand' to run commands after the container is created.
25- "postCreateCommand" : " pip3 install --user -r requirements-dev.txt && cp .env.sample.openai .env" ,
26+ "postCreateCommand" : " cp .env.sample.openai .env" ,
2627
2728 // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2829 "remoteUser" : " vscode"
Original file line number Diff line number Diff line change 11-r requirements.txt
2+ -r requirements-rag.txt
23pre-commit
34ruff
45black
You can’t perform that action at this time.
0 commit comments