Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 3.53 KB

Environment.md

File metadata and controls

55 lines (38 loc) · 3.53 KB

Here's an overview of GitHub Codespaces Environment:

Overview of GitHub Codespaces

GitHub Codespaces is a cloud-based development environment that allows you to develop directly within GitHub. It provides a fully configured development environment that can be accessed from anywhere, making it easier to collaborate and maintain consistency across different development setups.

Opening Codespaces

Open in GitHub Codespaces

Open in Dev Containers

Key Components of Your Setup

  1. devcontainer.json:

    • Name: The development container is named "C# (.NET)".
    • Image: Uses the Docker image mcr.microsoft.com/devcontainers/dotnet:1-8.0 for the .NET environment.
    • Post Create Command: Executes bash ./.devcontainer/setup.sh after the container is created to set up the environment.
    • Features: Includes several features such as Docker-in-Docker, .NET Aspire, Miniforge, and Node.js.
    • Customizations: Configures VS Code with specific extensions and settings, including support for C#, Python, Jupyter, and Markdown.
    • Host Requirements: Specifies high resource requirements (32 CPUs, 128GB memory, 128GB storage).
  2. requirements.txt:

    • Lists Python packages to be installed, including huggingface_hub, jupyter, onnxruntime-genai, numpy, matplotlib, and openai.
  3. setup.sh:

    • Installs Git Large File Storage (LFS) and the required Python packages.
    • Sets up directories and clones various models from Hugging Face.
    • Builds and installs CMake.
    • Clones and builds ONNX Runtime and ONNX Runtime GenAI.

Workflow

  1. Container Initialization:

    • The devcontainer.json file configures the development environment, specifying the Docker image and features to be used.
    • After the container is created, the setup.sh script is executed to install dependencies and set up the environment.
  2. Environment Customization:

    • VS Code is customized with extensions for C#, Python, Jupyter, and Markdown, enhancing the development experience.
    • Specific settings are applied to ensure a consistent development environment.
  3. Model and Library Setup:

    • The setup.sh script handles the installation of Git LFS, Python packages, and the setup of directories for models.
    • Models are cloned from Hugging Face, and ONNX Runtime is built and installed.

Benefits of using Devcontainer Enviroments

  • Consistency: Ensures a consistent development environment across different machines and team members.
  • Portability: Allows you to develop from anywhere with a cloud-based environment.
  • Customization: Provides flexibility to customize the environment with specific tools and extensions.
  • Collaboration: Facilitates collaboration by providing a shared development environment.

Summary

The demo setup leverages GitHub Codespaces to create a robust and consistent development environment for .NET and Python projects, with extensive customization and support for various tools and models. This setup is particularly useful for complex projects requiring high computational resources and collaboration.