Skip to content

Commit bb1756e

Browse files
authored
Merge pull request #11 from github/update_codespace
Update Codespace with latest changes.
2 parents 2268ec2 + 9b849fa commit bb1756e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+253
-135
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ARG VARIANT="focal"
2+
FROM buildpack-deps:${VARIANT}-curl
3+
4+
LABEL dev.containers.features="common"
5+
6+
COPY first-run-notice.txt /tmp/scripts/
7+
8+
# Move first run notice to right spot
9+
RUN mkdir -p "/usr/local/etc/vscode-dev-containers/" \
10+
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/
11+
12+
# Remove scripts now that we're done with them
13+
RUN rm -rf /tmp/scripts

.devcontainer/bootstrap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
ROOT_DIR=/workspaces/codespaces-models
4+
5+
npm install ${ROOT_DIR}
6+
7+
pip install -r ${ROOT_DIR}/requirements.txt
8+

.devcontainer/devcontainer.json

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,44 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/universal:2",
3-
"updateContentCommand": "npm install; pip install -r requirements.txt",
4-
"postStartCommand": "npm install; pip install -r requirements.txt",
2+
"build": {
3+
"dockerfile": "./Dockerfile",
4+
"context": "."
5+
},
6+
"features": {
7+
"ghcr.io/devcontainers/features/common-utils:2": {
8+
"username": "codespace",
9+
"userUid": "1000",
10+
"userGid": "1000"
11+
},
12+
"ghcr.io/devcontainers/features/node:1": {
13+
"version": "20"
14+
},
15+
"ghcr.io/devcontainers/features/python:1": {
16+
"version": "3.11.9",
17+
"installJupyterLab": "false"
18+
},
19+
"ghcr.io/devcontainers/features/git:1": {
20+
"version": "latest",
21+
"ppa": "false"
22+
},
23+
"ghcr.io/devcontainers/features/git-lfs:1": {
24+
"version": "latest"
25+
},
26+
"ghcr.io/devcontainers/features/github-cli:1": {
27+
"version": "latest"
28+
}
29+
},
30+
"overrideFeatureInstallOrder": [
31+
"ghcr.io/devcontainers/features/common-utils",
32+
"ghcr.io/devcontainers/features/git",
33+
"ghcr.io/devcontainers/features/node",
34+
"ghcr.io/devcontainers/features/python",
35+
"ghcr.io/devcontainers/features/git-lfs",
36+
"ghcr.io/devcontainers/features/github-cli"
37+
],
38+
"remoteUser": "codespace",
39+
"containerUser": "codespace",
40+
"updateContentCommand": "${containerWorkspaceFolder}/.devcontainer/bootstrap",
41+
"postStartCommand": "${containerWorkspaceFolder}/.devcontainer/bootstrap",
542
"customizations": {
643
"codespaces": {
744
"disableAutomaticConfiguration": true,
@@ -16,10 +53,19 @@
1653
"ms-toolsai.prompty"
1754
],
1855
"settings": {
56+
/*
57+
NOTE: excluding these Python environments causes Jupyter to select the remaining environment by default
58+
The default environment will be: /usr/local/python/current/bin/python
59+
*/
60+
"jupyter.kernels.excludePythonEnvironments": [
61+
"/usr/local/python/current/bin/python3",
62+
"/usr/bin/python3",
63+
"/bin/python3"
64+
],
1965
"workbench.editorAssociations": {
2066
"*.md": "vscode.markdown.preview.editor"
2167
}
2268
}
2369
}
2470
}
25-
}
71+
}

.devcontainer/first-run-notice.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
👋 Welcome to your shiny new Codespace for interacting with GitHub Models! We've got everything fired up and ready for you to explore AI Models hosted on Azure AI.
2+
3+
Take a look at the README to find all of the information you need to get started.
4+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
.vscode/
1+
.vscode/*
2+
!.vscode/extensions.json
3+
!.vscode/launch.json
24
__pycache__/
35
.env
46
.DS_Store

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"unwantedRecommendations": [
3+
"ms-azuretools.vscode-docker"
4+
]
5+
}

.vscode/launch.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Run JavaScript Sample",
5+
"program": "${file}",
6+
"cwd": "${fileDirname}",
7+
"envFile": "${workspaceFolder}/.env",
8+
"outputCapture": "std",
9+
"request": "launch",
10+
"skipFiles": [
11+
"<node_internals>/**"
12+
],
13+
"type": "node"
14+
},
15+
{
16+
"name": "Run Python Sample",
17+
"program": "${file}",
18+
"cwd": "${fileDirname}",
19+
"envFile": "${workspaceFolder}/.env",
20+
"redirectOutput": false,
21+
"request": "launch",
22+
"type": "debugpy"
23+
}
24+
]
25+
}

cookbooks/python/langchain/lc_openai_getting_started.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"os.environ[\"OPENAI_API_KEY\"] = os.getenv(\"GITHUB_TOKEN\")\n",
5353
"os.environ[\"OPENAI_BASE_URL\"] = \"https://models.inference.ai.azure.com/\"\n",
5454
"\n",
55-
"GPT_MODEL = \"gpt-4o\"\n",
55+
"GPT_MODEL = \"gpt-4o-mini\"\n",
5656
"\n",
5757
"llm = ChatOpenAI(model=GPT_MODEL)"
5858
]
@@ -373,7 +373,7 @@
373373
"name": "python",
374374
"nbconvert_exporter": "python",
375375
"pygments_lexer": "ipython3",
376-
"version": "3.10.14"
376+
"version": "3.11.9"
377377
}
378378
},
379379
"nbformat": 4,

cookbooks/python/llamaindex/rag_getting_started.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"\n",
3939
"To run RAG, you need 2 models: a chat model, and an embedding model. The GitHub Model service offers different options.\n",
4040
"\n",
41-
"For instance you could use an Azure OpenAI chat model (`gpt-4o`) and embedding model (`text-embedding-3-small`), or a Cohere chat model (`Cohere-command-r-plus`) and embedding model (`Cohere-embed-v3-multilingual`).\n",
41+
"For instance you could use an Azure OpenAI chat model (`gpt-4o-mini`) and embedding model (`text-embedding-3-small`), or a Cohere chat model (`Cohere-command-r-plus`) and embedding model (`Cohere-embed-v3-multilingual`).\n",
4242
"\n",
4343
"We'll proceed using some of the Azure OpenAI models below. You can find [how to leverage Cohere models in the LlamaIndex documentation](https://docs.llamaindex.ai/en/stable/examples/llm/cohere/).\n",
4444
"\n",
@@ -89,7 +89,7 @@
8989
"logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))\n",
9090
"\n",
9191
"llm = OpenAI(\n",
92-
" model=\"gpt-4o\",\n",
92+
" model=\"gpt-4o-mini\",\n",
9393
" api_key=os.getenv(\"OPENAI_API_KEY\"),\n",
9494
" api_base=os.getenv(\"OPENAI_BASE_URL\"),\n",
9595
")\n",
@@ -258,7 +258,7 @@
258258
"name": "python",
259259
"nbconvert_exporter": "python",
260260
"pygments_lexer": "ipython3",
261-
"version": "3.10.14"
261+
"version": "3.11.9"
262262
}
263263
},
264264
"nbformat": 4,

cookbooks/python/mistralai/evaluation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@
525525
"name": "python",
526526
"nbconvert_exporter": "python",
527527
"pygments_lexer": "ipython3",
528-
"version": "3.10.13"
528+
"version": "3.11.9"
529529
}
530530
},
531531
"nbformat": 4,

0 commit comments

Comments
 (0)