https://github.com/maresb/micromamba-role-example
https://github.com/maresb/micromamba-role-example
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/maresb/micromamba-role-example
- Owner: maresb
- Created: 2021-11-03T18:44:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-27T13:14:40.000Z (over 4 years ago)
- Last Synced: 2025-01-17T08:35:56.345Z (over 1 year ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# micromamba-role-example
## Intro
Here's how I use the [micromamba role](https://github.com/mamba-org/ansible-role-micromamba) to bootstrap from Ubuntu's Ansible to conda-forge's Ansible, and set up a root-owned base environment.
Users with sudo enabled can `sudo mamba install` into the base environment.
Otherwise, users are suggested to `mamba env create` their own environment.
## Building and running
```bash
docker build -t micromamba-role-example .
docker run --rm -it micromamba-role-example
```
Then you can for example run
```bash
mamba activate myenv
s3fs --version
```
## Design choices
### Failed admin group for base environment
I originally wanted /opt/conda to be writable by the group `condaadmins` and tried
```bash
chgrp -R condaadmins /opt/conda
chmod -R g+rwX /opt/conda
find /opt/conda -type d -exec chmod g+s {} \;
```
But unfortunately when conda extracts freshly installed packages, they are not group writeable. Thus this leads to breakage.
### Alternative user init
I have [an idempotent script](alternative-user-init.sh) for updating `/etc/skel` which creates a temporary user, runs `conda init` and `mamba init`, and then copies the resulting `.bashrc` back to `/etc/skel`.