File tree 6 files changed +32
-23
lines changed
6 files changed +32
-23
lines changed 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 2
2
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
3
3
{
4
4
"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
+ },
7
9
"features" : {
8
10
"ghcr.io/devcontainers/features/azure-cli:latest" : {},
9
11
"ghcr.io/azure/azure-dev/azd:latest" : {}
19
21
20
22
// Add the IDs of extensions you want installed when the container is created.
21
23
"extensions" : [
22
- " ms-python.python" ,
23
- " charliermarsh.ruff" ,
24
- " ms-python.black-formatter"
24
+ " ms-python.python"
25
25
]
26
26
}
27
27
},
28
28
29
- // Use 'postCreateCommand' to run commands after the container is created.
30
- "postCreateCommand" : " pip3 install --user -r requirements-dev.txt" ,
31
-
32
29
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
33
30
"remoteUser" : " vscode"
34
31
}
Original file line number Diff line number Diff line change 2
2
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
3
3
{
4
4
"name" : " python-openai-demos (GitHub models)" ,
5
- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5
+ "build" : {
6
+ "dockerfile" : " Dockerfile" ,
7
+ "context" : " .."
8
+ },
6
9
"features" : {
7
10
},
8
11
// Configure tool-specific properties.
16
19
17
20
// Add the IDs of extensions you want installed when the container is created.
18
21
"extensions" : [
19
- " ms-python.python" ,
20
- " charliermarsh.ruff" ,
21
- " ms-python.black-formatter"
22
+ " ms-python.python"
22
23
]
23
24
}
24
25
},
25
26
26
27
// 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" ,
28
29
29
30
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
30
31
"remoteUser" : " vscode"
Original file line number Diff line number Diff line change 2
2
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
3
3
{
4
4
"name" : " python-openai-demos (Ollama)" ,
5
- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5
+ "build" : {
6
+ "dockerfile" : " Dockerfile" ,
7
+ "context" : " .."
8
+ },
6
9
"features" : {
7
10
"ghcr.io/prulloac/devcontainer-features/ollama:1" : {}
8
11
},
17
20
18
21
// Add the IDs of extensions you want installed when the container is created.
19
22
"extensions" : [
20
- " ms-python.python" ,
21
- " charliermarsh.ruff" ,
22
- " ms-python.black-formatter"
23
+ " ms-python.python"
23
24
]
24
25
}
25
26
},
26
27
27
28
// 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" ,
29
30
30
31
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
31
32
"remoteUser" : " vscode" ,
Original file line number Diff line number Diff line change 2
2
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
3
3
{
4
4
"name" : " python-openai-demos (OpenAI.com)" ,
5
- "image" : " mcr.microsoft.com/devcontainers/python:3.11-bullseye" ,
5
+ "build" : {
6
+ "dockerfile" : " Dockerfile" ,
7
+ "context" : " .."
8
+ },
6
9
// Configure tool-specific properties.
7
10
"customizations" : {
8
11
// Configure properties specific to VS Code.
14
17
15
18
// Add the IDs of extensions you want installed when the container is created.
16
19
"extensions" : [
17
- " ms-python.python" ,
18
- " charliermarsh.ruff" ,
19
- " ms-python.black-formatter"
20
+ " ms-python.python"
20
21
]
21
22
}
22
23
},
23
24
24
25
// 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" ,
26
27
27
28
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
28
29
"remoteUser" : " vscode"
Original file line number Diff line number Diff line change 1
1
-r requirements.txt
2
+ -r requirements-rag.txt
2
3
pre-commit
3
4
ruff
4
5
black
You can’t perform that action at this time.
0 commit comments