Microsoft Fabric: Integrate VS Code with Docker using Mamba

Data Fabric

Discover the seamless developer experience with Microsoft Fabric in Visual Studio Code. By leveraging Docker images and Visual Studio Dev Containers, you can avoid the hassle of installing numerous tools, dependencies, and extensions.

Quick Summary

Find all the changes mentioned in this guide in the forked Microsoft repository: https://github.com/danielambler/SynapseVSCode_Mamba

Detailed Guide

While Microsoft provides articles on both scenarios, the Docker setup wasn’t straightforward for me. So, I’ve documented the steps I took to get it running in my environment.

VS Code Extension : VS Code extension overview – Microsoft Fabric | Microsoft Learn
VS Code Extension with Docker Support :  VS Code extension with Docker support – Microsoft Fabric | Microsoft Learn

Following the steps in the Docker support article worked, but I faced some timeouts in my setup and had to make additional changes.

Steps to integrate

Step 1 – Clone the Repository : Clone the Synapse VS Code Dev Container sample.

Step 1.5 –  Modify the DockerFile : Open the samples/.devcontainer/mariner folder and update the following section:

# Install PySpark in the base Conda environment
ENV SPARK_VERSION=3.4.1
RUN conda install -c conda-forge pyspark==${SPARK_VERSION}

to

# Install PySpark in the base Conda environment
RUN conda install -c conda-forge mamba # Install Mamba
ENV SPARK_VERSION=3.4.1
RUN mamba install -c conda-forge pyspark==${SPARK_VERSION} # Use Mamba

Step 2 – Open the samples subfolder : From the repository root, open the samples subfolder. Ignore the repo discovery warning in VS Code.

Step 2.5 – Reopen in container : In VS Code, press CTRL + Shift + P to open the command palette manually and select ‘Reopen in Container’.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top