Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Added Installer initial Version. #224

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion learn/_sidebar.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
"faq",

{
"type": "category",
"label": "CEPs",
Expand All @@ -13,5 +14,6 @@
"dirName": "ceps"
}
]
}
},
"installers"
]
13 changes: 13 additions & 0 deletions learn/installers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Conda Installers
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
sidebar_position: 1
---

# Conda Installation Help

Choose the right conda installer for your system using our interactive selector below:


import CondaInstaller from '../src/components/Installer';

<CondaInstaller />
191 changes: 191 additions & 0 deletions src/components/Installer/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
import React, { useState } from "react";
import styles from "./styles.module.css";

export default function CondaInstallerSelector() {
const [os, setOs] = useState("");
const [arch, setArch] = useState("");
const [installerType, setInstallerType] = useState("");

const osArchitectures = {
Linux: ["x64", "aarch64", "ppc64le"],
macOS: ["x64", "ARM64"],
Windows: ["x64", "ARM64 (Beta)"],
};

const installerData = {
Anaconda: {
name: "Anaconda",
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
url: "https://docs.anaconda.com/free/anaconda/install/index.html",
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
defaultChannel: "defaults",
description: "Complete distribution for scientific Python development",
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
},
Miniconda: {
name: "Miniconda",
url: "https://docs.conda.io/en/latest/miniconda.html",
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
defaultChannel: "defaults",
description: "Minimal conda installer with Python",
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
},
Miniforge: {
name: "Miniforge",
url: "https://github.com/conda-forge/miniforge",
defaultChannel: "conda-forge",
description: "Community-driven minimal installer using conda-forge",
},
Mambaforge: {
name: "Mambaforge",
url: "https://github.com/conda-forge/miniforge#mambaforge",
defaultChannel: "conda-forge",
description: "Miniforge variant with mamba as default package manager",
},
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
Micromamba: {
name: "Micromamba",
url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba",
defaultChannel: "conda-forge",
description: "Standalone fast package manager (no conda required)",
isStandalone: true,
},
Pixi: {
name: "Pixi",
url: "https://prefix.dev/docs/pixi/installation",
defaultChannel: "conda-forge",
description: "Modern package management solution for Python, C++, and R",
isStandalone: true,
},
};

const getInstallerDetails = () => {
if (!os || !installerType) {
return null;
}
return installerData[installerType];
};

const installerDetails = getInstallerDetails();

return (
<div className={styles.container}>
<div className={styles.selector_wrapper}>
<h2 className={styles.title}>Conda Installer Selector</h2>
<p className={styles.description}>
Choose your operating system, architecture, and installer type
</p>

<div className={styles.form_group}>
<div>
<label htmlFor="os-select" className={styles.label}>
{" "}
Operating System
</label>
<select
id="os-select"
value={os}
onChange={(e) => {
setOs(e.target.value);
setArch("");
}}
className={styles.select}
>
<option value="">Select Operating System</option>
{Object.keys(osArchitectures).map((osName) => (
<option key={osName} value={osName}>
{osName}
</option>
))}
</select>
</div>

{os && (
<div>
<label htmlFor="arch-select" className={styles.label}>
{" "}
Architecture
</label>
<select
id="arch-select"
value={arch}
onChange={(e) => setArch(e.target.value)}
className={styles.select}
>
<option value="">Select Architecture</option>
{osArchitectures[os].map((archOption) => (
<option key={archOption} value={archOption}>
{archOption}
</option>
))}
</select>
</div>
)}

<div>
<label htmlFor="installer-select" className={styles.label}>
{" "}
Installer Type
</label>
<select
id="installer-select"
value={installerType}
onChange={(e) => setInstallerType(e.target.value)}
className={styles.select}
>
<option value="">Select Installer Type</option>
{Object.entries(installerData).map(([key, data]) => (
<option key={key} value={key}>
{data.name}
</option>
))}
</select>
</div>

{installerDetails && (
<div className={styles.details_wrapper}>
<div>
<strong>Selected Configuration:</strong>
<ul className={styles.details_list}>
<li>
OS:
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
{os}
Avik-creator marked this conversation as resolved.
Show resolved Hide resolved
</li>
{arch && (
<li>
Architecture:
{arch}
</li>
)}
<li>
Installer:
{installerDetails.name}
</li>
<li>
Default Channel:
{installerDetails.defaultChannel}
</li>
</ul>
</div>

<div className={styles.description}>
<p>{installerDetails.description}</p>
<a
href={installerDetails.url}
target="_blank"
rel="noopener noreferrer"
className={styles.link}
>
Installation Guide →
</a>
</div>

{installerDetails.isStandalone && (
<div className={styles.standalone_warning}>
<p>
⚠️ This is a standalone tool that does not require a full
conda installation.
</p>
</div>
)}
</div>
)}
</div>
</div>
</div>
);
}
67 changes: 67 additions & 0 deletions src/components/Installer/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.container {
display: flex;
justify-content: center;
align-items: center;
}

.selector_wrapper {
margin: 2rem 0;
padding: 1rem;
border: 1px solid green;
border-radius: 8px;
max-width: 600px;
width: 100%;
}

.title {
margin-bottom: 1rem;
color: green;
}

.description {
margin-bottom: 1rem;
}

.form_group {
display: flex;
flex-direction: column;
gap: 1rem;
}

.label {
display: block;
margin-bottom: 0.5rem;
}

.select {
width: 100%;
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ccc;
}

.details_wrapper {
margin-top: 1rem;
padding: 1rem;
background-color: #f8f9fa;
border-radius: 4px;
}

.details_list {
margin-top: 0.5rem;
padding-left: 1.5rem;
}

.link {
display: inline-block;
margin-top: 0.5rem;
color: #0f6c12;
text-decoration: underline;
}

.standalone_warning {
margin-top: 1rem;
padding: 1rem;
background-color: #e8f0fe;
border-radius: 4px;
}
Loading