Friday, March 24, 2023

Development Environment on Windows 11

Recently i started using Windows 11 after spending a good amount of time on Ubuntu as my primary OS on my home laptop. There was no strong reason to move other than just wanted to see if i can build a better development environment on Windows than what i had on Ubuntu. To my pleasant surprise, Windows 11 with WSL Ubuntu brings the best of both worlds - a perfect functional and responsive desktop environment together with the powerful tools from the Ubuntu Linux for running docker, kubernetes cluster and anything else that one is used to on a Linux setup. 

Found this article to be pretty useful in setting up WLS2 and install Docker and minikube in WSL2 on Windows 11 - https://www.virtualizationhowto.com/2021/11/install-minikube-in-wsl-2-with-kubectl-and-helm/ As you can note that no need to install docker desktop. The docker daemon run in WSL2 Ubuntu VM.

The article has all the steps outlined so no point in repeating it here. It will get all the required tools one needs to work with k8s.


To setup a development environment for doing ML with conda, python3, Jupyter notebook, tensorflow and VS Code:

1. Install conda environment and package manager - https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html 

Used miniconda3.

conda init

conda create -n devpy python

conda activate devpy

Will create a virtual environment devpy and activates it.

2. Install Jupyter notebook

pip install notebook

3. Install TensorFlow and other ML related python libs

pip install --upgrade pip

pip install  --ignore-installed --upgrade  tensorflow matplotlib pandas sklearn scipy seaborn

jupyter notebook

4. Launch the notebook in the VS Code editor


VS Code terminal will launch Ubuntu. Also install the Python extension which will show the option to run the Jupyter notebook in the devpy virtual environment we created above.

See this article on how to use VS Code with WSL2 - Using WSL 2 with Visual Studio Code 

To go to the location where WSL2 Ubuntu files are from Windows Explorer use path \\wsl$\ubuntu.

To go to the location where Windows files are in Ubuntu terminal use path /mnt/c/.

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know: Service Registry  pattern provides a  central location  fo...