diff --git a/.vscode/settings.json b/.vscode/settings.json index 52620a0c..4f79f098 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "devcontainer", "irobot", "jimbobbennett", + "livestreams", "microcontrollers", "milliwatts", "Miniforge", diff --git a/blog-banners.sketch b/blog-banners.sketch index 244e035d..e8c5a37e 100644 Binary files a/blog-banners.sketch and b/blog-banners.sketch differ diff --git a/blog/config.yaml b/blog/config.yaml index e10d57f3..82dbaed9 100644 --- a/blog/config.yaml +++ b/blog/config.yaml @@ -343,6 +343,15 @@ params: image: /images/livestreams/ml-beginners-thumb.png previous: series: + - title: "Machine Learning for Beginners" + videos: + - title: "ML for Beginners - introduction to Machine Learning" + id: vHSctz01IFY + description: "🤖 Welcome to the first of our Machine Learning livestreams! In this episode, Jim and Bea Stollnitz from Microsoft introduce Machine Learning, covering the basics of what it is, what you need to know to be successful in learning ML, and answering real-world questions from our live audience." + - title: "ML for Beginners - introduction to Machine Learning Q&A" + id: BbwaxmLHpuU + description: "🤖 Welcome to the second of our Machine Learning livestreams! In this episode, Jim and Bea Stollnitz from Microsoft continue to introduce Machine Learning, answering real-world questions from our live audience around careers, responsible AI, and more." + - title: "Crack code interview problems in Python" videos: - title: "Episode 1 - Sudoku validator" diff --git a/blog/content/blogs/azure-functions-python-m1/dev-containers-add-files.png b/blog/content/blogs/azure-functions-python-m1/dev-containers-add-files.png new file mode 100644 index 00000000..316843e1 Binary files /dev/null and b/blog/content/blogs/azure-functions-python-m1/dev-containers-add-files.png differ diff --git a/blog/content/blogs/azure-functions-python-m1/dev-containers-func-python.png b/blog/content/blogs/azure-functions-python-m1/dev-containers-func-python.png new file mode 100644 index 00000000..dcf4ce17 Binary files /dev/null and b/blog/content/blogs/azure-functions-python-m1/dev-containers-func-python.png differ diff --git a/blog/content/blogs/azure-functions-python-m1/dev-containers-show-all.png b/blog/content/blogs/azure-functions-python-m1/dev-containers-show-all.png new file mode 100644 index 00000000..b2ace510 Binary files /dev/null and b/blog/content/blogs/azure-functions-python-m1/dev-containers-show-all.png differ diff --git a/blog/content/blogs/azure-functions-python-m1/index.md b/blog/content/blogs/azure-functions-python-m1/index.md index 00930e66..b3302eb5 100644 --- a/blog/content/blogs/azure-functions-python-m1/index.md +++ b/blog/content/blogs/azure-functions-python-m1/index.md @@ -3,7 +3,7 @@ author: "Jim Bennett" categories: ["apple", "azure", "azurefunctions", "functions", "m1", "m2", "applesilicon"] date: 2023-05-08 description: "" -draft: true +draft: false slug: "azure-functions-python-m1" tags: ["apple", "azure", "azurefunctions", "functions", "m1", "m2", "applesilicon"] title: "Run Azure Functions with Python on Apple Silicon" @@ -53,4 +53,62 @@ You need [docker](https://www.docker.com) installed, so get this installed first - From the docker menu item, select **Settings** - From the **General** section, ensure *Use Virtualization framework* is selected -  \ No newline at end of file +  + +- From the **Features in development** section, select the **Beat Features** and select *Use Rosetta for x86/amd64 emulation on Apple Silicon* + +  + +- Apply these changes and docker desktop will restart. + +## Create the dev container + +The default Azure Functions and Python3 dev container is ideal for this as it is an x86/x64 container. + +- Make sure docker is running. +- Create a folder for your Azure Functions app and open it in VS Code (or open the one you already have created) +- Ensure you have the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed. This also comes with the [Remote Development extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack). +- Open the command palette and select *Dev Containers: Add Dev Container configuration files...* + +  + +- Select *Show all definitions* to see all the dev container options + +  + +- Search for and select *Azure Functions & Python 3* + +  + +- Select any other features you want. You don't need any for Azure Functions to work. + +- The container files will be built, and an option will pop up to re-open the folder in the container. Select **Reopen in Container** + +  + +- Once the repo has been re-opened in the container, open the terminal and you will see it marked as running under Rosetta + +  + +- If you don't already have an Azure Functions app, you can now create one. +- Run your Azure Functions app! + + ```bash + vscode ➜ /workspaces/functions-arm $ func start + Found Python version 3.9.16 (python3). + + Azure Functions Core Tools + Core Tools Version: 4.0.5148 Commit hash: N/A (64-bit) + Function Runtime Version: 4.17.3.20392 + + + Functions: + + HttpTrigger: [GET,POST] http://localhost:7071/api/HttpTrigger + + For detailed output, run func with --verbose flag. + [2023-05-08T22:07:35.900Z] Worker process started and initialized. + [2023-05-08T22:07:38.282Z] Host lock lease acquired by instance ID '0000000000000000000000008A10FEBD'. + ``` + +Once you commit the devcontainer files to GitHub, you will also be able to open this in a Codespace and have it pre-configured with everything you need. You can also add more things to the container depending on your needs, such as extensions that are automatically loaded when the container is loaded, install things, whatever you need! Check out the [the VS Code developing inside containers documentation](https://code.visualstudio.com/docs/devcontainers/containers) to learn more. diff --git a/blog/content/blogs/azure-functions-python-m1/reopen-in-container.png b/blog/content/blogs/azure-functions-python-m1/reopen-in-container.png new file mode 100644 index 00000000..9cba1adc Binary files /dev/null and b/blog/content/blogs/azure-functions-python-m1/reopen-in-container.png differ diff --git a/blog/content/blogs/azure-functions-python-m1/rosetta-terminal.png b/blog/content/blogs/azure-functions-python-m1/rosetta-terminal.png new file mode 100644 index 00000000..3752801f Binary files /dev/null and b/blog/content/blogs/azure-functions-python-m1/rosetta-terminal.png differ diff --git a/blog/layouts/_default/videos.html b/blog/layouts/_default/videos.html index c3e0c948..0e67dd16 100644 --- a/blog/layouts/_default/videos.html +++ b/blog/layouts/_default/videos.html @@ -13,7 +13,7 @@