Skip to content

refactor(anaconda): ♻️ refactor & update to 24.5.0 #1296

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 40 additions & 5 deletions src/anaconda/NOTES.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,55 @@
## Using Conda
## Using Conda and Mamba

This Feature includes [the `conda` package manager](https://docs.conda.io/projects/conda/en/latest/index.html). Additional packages installed using Conda will be downloaded from Anaconda or another repository if you configure one. To reconfigure Conda in this container to access an alternative repository, please see information on [configuring Conda channels here](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html ).
This Feature includes [the `conda` package manager](https://docs.conda.io/projects/conda/en/latest/index.html) and optionally [the `mamba` package manager](https://mamba.readthedocs.io/en/latest/), which provides faster dependency resolution and package installation. Additional packages will be downloaded from Anaconda, conda-forge, or another repository if you configure one.

Access to the Anaconda repository is covered by the [Anaconda Terms of Service](https://legal.anaconda.com/policies/en/?name=terms-of-service), which may require some organizations to obtain a commercial license from Anaconda. **However**, when used with GitHub Codespaces or GitHub Actions, **all users are permitted** to use the Anaconda Repository through the service, including organizations normally required by Anaconda to obtain a paid license for commercial activities. Note that third-party packages may be licensed by their publishers in ways that impact your intellectual property, and are used at your own risk.
### Configuration Options

This Feature offers several configuration options:

- **useCondaForge**: Set to `true` (default) to use conda-forge as the default channel, which offers better package compatibility and more permissive licensing.
- **installMamba**: Set to `true` (default) to install Mamba alongside Conda for faster package management.
- **useSystemPackages**: Set to `true` (default) to use the system package manager on Debian/Ubuntu systems to install Conda.
- **installFullAnaconda**: Set to `true` to install the full Anaconda distribution instead of the minimal Miniconda. Defaults to `false`.

### Using Mamba

When Mamba is installed, you can use the following commands and aliases for faster package management:

```bash
# Use mamba directly
mamba install package-name

# Use aliases that are automatically set up
conda-fast install package-name
cf install package-name
```

Mamba uses the same command syntax as conda but resolves dependencies much faster, especially for complex environments.

### Conda Channels

To reconfigure Conda in this container to access alternative repositories, please see information on [configuring Conda channels here](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html).

## Licensing Information

Access to the Anaconda repository is covered by the [Anaconda Terms of Service](https://legal.anaconda.com/policies/en/?name=terms-of-service), which may require some organizations to obtain a commercial license from Anaconda. **However**, when used with GitHub Codespaces or GitHub Actions, **all users are permitted** to use the Anaconda Repository through the service, including organizations normally required by Anaconda to obtain a paid license for commercial activities.

If you've enabled the `useCondaForge` option (default), your container will use conda-forge as the default channel, which has more permissive licensing than the default Anaconda repository.

Note that third-party packages may be licensed by their publishers in ways that impact your intellectual property, and are used at your own risk.

## Installing a different version of Python

As covered in the [user FAQ](https://docs.anaconda.com/anaconda/user-guide/faq) for Anaconda, you can install different versions of Python than the one in this image by running the following from a terminal:

```bash
conda install python=3.7
# Or faster with mamba
mamba install python=3.7
```


## OS Support

This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. It also has limited support for RedHat-based systems, Alpine Linux, and openSUSE/SLES.

`bash` is required to execute the `install.sh` script.
53 changes: 46 additions & 7 deletions src/anaconda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

```json
"features": {
"ghcr.io/devcontainers/features/anaconda:1": {}
"ghcr.io/ran-dall/devcontainer-features/anaconda:1": {}
}
```

Expand All @@ -16,29 +16,68 @@
| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| version | Select or enter an anaconda version. | string | latest |
| useCondaForge | Set conda-forge as the default channel for better package compatibility | boolean | true |
| installMamba | Install mamba for faster package management | boolean | true |
| useSystemPackages | Use system package manager on Debian/Ubuntu systems to install Conda | boolean | true |
| installFullAnaconda | Install full Anaconda distribution instead of minimal Miniconda | boolean | false |

## Using Conda
## Using Conda and Mamba

This Feature includes [the `conda` package manager](https://docs.conda.io/projects/conda/en/latest/index.html). Additional packages installed using Conda will be downloaded from Anaconda or another repository if you configure one. To reconfigure Conda in this container to access an alternative repository, please see information on [configuring Conda channels here](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html ).
This Feature includes [the `conda` package manager](https://docs.conda.io/projects/conda/en/latest/index.html) and optionally [the `mamba` package manager](https://mamba.readthedocs.io/en/latest/), which provides faster dependency resolution and package installation. Additional packages will be downloaded from Anaconda, conda-forge, or another repository if you configure one.

Access to the Anaconda repository is covered by the [Anaconda Terms of Service](https://legal.anaconda.com/policies/en/?name=terms-of-service), which may require some organizations to obtain a commercial license from Anaconda. **However**, when used with GitHub Codespaces or GitHub Actions, **all users are permitted** to use the Anaconda Repository through the service, including organizations normally required by Anaconda to obtain a paid license for commercial activities. Note that third-party packages may be licensed by their publishers in ways that impact your intellectual property, and are used at your own risk.
### Configuration Options

This Feature offers several configuration options:

- **useCondaForge**: Set to `true` (default) to use conda-forge as the default channel, which offers better package compatibility and more permissive licensing.
- **installMamba**: Set to `true` (default) to install Mamba alongside Conda for faster package management.
- **useSystemPackages**: Set to `true` (default) to use the system package manager on Debian/Ubuntu systems to install Conda.
- **installFullAnaconda**: Set to `true` to install the full Anaconda distribution instead of the minimal Miniconda. Defaults to `false`.

### Using Mamba

When Mamba is installed, you can use the following commands and aliases for faster package management:

```bash
# Use mamba directly
mamba install package-name

# Use aliases that are automatically set up
conda-fast install package-name
cf install package-name
```

Mamba uses the same command syntax as conda but resolves dependencies much faster, especially for complex environments.

### Conda Channels

To reconfigure Conda in this container to access alternative repositories, please see information on [configuring Conda channels here](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html).

## Licensing Information

Access to the Anaconda repository is covered by the [Anaconda Terms of Service](https://legal.anaconda.com/policies/en/?name=terms-of-service), which may require some organizations to obtain a commercial license from Anaconda. **However**, when used with GitHub Codespaces or GitHub Actions, **all users are permitted** to use the Anaconda Repository through the service, including organizations normally required by Anaconda to obtain a paid license for commercial activities.

If you've enabled the `useCondaForge` option (default), your container will use conda-forge as the default channel, which has more permissive licensing than the default Anaconda repository.

Note that third-party packages may be licensed by their publishers in ways that impact your intellectual property, and are used at your own risk.

## Installing a different version of Python

As covered in the [user FAQ](https://docs.anaconda.com/anaconda/user-guide/faq) for Anaconda, you can install different versions of Python than the one in this image by running the following from a terminal:

```bash
conda install python=3.7
# Or faster with mamba
mamba install python=3.7
```


## OS Support

This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. It also has limited support for RedHat-based systems, Alpine Linux, and openSUSE/SLES.

`bash` is required to execute the `install.sh` script.


---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/devcontainers/features/blob/main/src/anaconda/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/ran-dall/devcontainer-features/blob/main/src/anaconda/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
24 changes: 22 additions & 2 deletions src/anaconda/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "anaconda",
"version": "1.0.12",
"version": "1.1.0",
"name": "Anaconda",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/anaconda",
"options": {
Expand All @@ -11,11 +11,31 @@
],
"default": "latest",
"description": "Select or enter an anaconda version."
},
"useCondaForge": {
"type": "boolean",
"default": true,
"description": "Set conda-forge as the default channel for better package compatibility"
},
"installMamba": {
"type": "boolean",
"default": true,
"description": "Install mamba for faster package management"
},
"useSystemPackages": {
"type": "boolean",
"default": true,
"description": "Use system package manager on Debian/Ubuntu systems to install Conda"
},
"installFullAnaconda": {
"type": "boolean",
"default": false,
"description": "Install full Anaconda distribution instead of minimal Miniconda"
}
},
"containerEnv": {
"CONDA_DIR": "/usr/local/conda",
"PATH": "/usr/local/conda/bin:${PATH}"
"PATH": "/usr/local/conda/bin:/opt/conda/bin:${PATH}"
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
Expand Down
Loading