This is a skeleton repo/template/blueprint that renders runnable, interactive Jupyter Notebooks in the browser using Mercury via Azure Container Apps.
It includes:
- Application code in the
src/
directory (really just a sample Jupyter Notebook, generated by Mercury) - Infrastructure as Code (in the
/infra
directory), written in Bicep, that provision Azure resources and specify how to deploy the code on Azure
The fastest way for you to get this application up and running on Azure is to use the azd up
command. This single command will create and configure all necessary Azure resources - including access policies and roles for your account and service-to-service communication with Managed Identities.
- Open a terminal, create a new empty folder, and change into it.
- Create a new Python virtual environment (optional but highly recommended)
- Run the following command to initialize the project, provision Azure resources, and deploy the application code.
azd init --template savannahostrowski/jupyter-mercury-aca
azd up
At the end of this step, you'll be able to visit a URL to see the web app + the Jupyter notebooks in src/
.
In the src/
directory, you'll find a sample notebook generated by Mercury. You can remove this file and replace it with your own Jupyter notebook(s). Remember to pip install
the Python package dependencies for any notebooks you add to the app and pip freeze > requirements.txt
to save the deps (this is important for installing the deps in the container)! Whenever, you're ready, re-run azd deploy
to redeploy the code to the resources on Azure!
In order to use this template, you'll need an Azure subscription. If you don't already have one, you can sign up for a free account here.
- More about the Azure Developer CLI - aka.ms/azd
- Find other templates on the Azure Developer CLI template gallery - aka.ms/awesome-azd