This repo is holds training materials and tools used for demos for the MSTICPy Python Package. Please refer to that site and the MSTICPy documentation on ReadTheDocs.
There are several options to creating or finding an environment to run the workshop notebooks. The two recommended options are:
- Local Anaconda installation
- Visual Studio Code Dev Container (both of these assume prior installation of VSCode)
You can also opt to create and run a Docker container using Jupyter classic web interface.
The Dockerfile.txt
and instructions for doing this are in the workshop folder
- please see the Jupyter Classic Docker instructions
The instructions for the other two options are below.
- Install Ananconda.
- Open the Ananconda prompt/terminal.
- Create a virtual environment: (replace with your choice of environment name)
conda create --name msticpy python=3.11
- Activate the environment: (replace with your choice of environment name)
conda activate msticpy
- Install Jupyter notebooks Conda package
conda install -c anaconda notebook
- Clone the
msticpy-training
repo (replace <src_root> with the location that you want to clone the repo):
cd <src_root>
git clone https://github.com/microsoft/msticpy-training
- Install required Python packages
pip install -r msticpy-training/requirements.txt
- Change directory to the workshop folder
cd msticpy-training/workshops/Jun2023
- Login to Azure using Azure CLI (This will return a login URL and a device code - copy the code and paste into the login page prompt and continue with normal authentication flow).
az login
- Run VS Code
code .
- Install VSCode Jupyter and Python extensions
Install docker for desktop on Windows :
Follow the instructions at docker docs - https://docs.docker.com/desktop/install/windows-install/
Build Docker image locally:
docker build -t msticpy-training -f ./.devcontainer/Dockerfile .
Run docker image:
docker run -p 8888:8888 msticpy-training
Connect VSCode to Connector: Attach to a Docker Container
To attach to a Docker container, either select Dev Containers: Attach to Running Container... from the Command Palette (F1) or use the Remote Explorer in the Activity Bar and from the Containers view, select the Attach to Container inline action on the container you want to connect to
-
Once you open a notebook in VSCode. You will see Select Kernel option on right hand top corner.
-
Once you click on it, you will be prompted to install Jupyter VSCode extension in container.
-
After you finished installation, you can then click Select Kernel and choose Connect to local Jupyter server.
-
Run Jupyter server URI from VSCode Terminal.
- and then enter the URL on the next screen.
- Finally, select a Remote Kernel.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.