Comments (6)
To enable installing conda packages as root and then using them as an arbitrary non-root use, I think only the location/permissions for the file referenced by BASH_ENV
needs to change. /opt/conda
currently has permissions 755.
Setting BASH_ENV
to /etc/bash.bashrc
might be a good way to go.
from micromamba-docker.
Implemented in dc4bf68.
from micromamba-docker.
Hi @Midnighter -- thank you for your interest in Micromamba. Here is one approach that you could take:
FROM mambaorg/micromamba:0.12.0
RUN groupadd conda && \
useradd --home-dir /home/conda --create-home --shell /bin/bash --skel /dev/null -g conda conda
RUN chown -R conda.conda /opt/conda
USER conda
ENV BASH_ENV /home/conda/.bashrc
RUN /bin/micromamba shell init -s bash -p $MAMBA_ROOT_PREFIX && \
echo "micromamba activate base" >> ~/home/conda/.bashrc
I am working on updating the image to make this more straight forward, but I'm not sure when I'll get that wrapped up.
from micromamba-docker.
Thank you for the suggestion! If it's easier to outline what you have in mind than to actually do it, feel free to post it here and I can work on the changes.
from micromamba-docker.
FWIW, I was able to use a non-root user just by clearing BASH_ENV
and bootstrapping the non-root user's .bashrc
:
ENV BASH_ENV=
RUN /bin/micromamba shell init -s bash -p $MAMBA_ROOT_PREFIX && \
echo "micromamba activate base" >> $HOME/.bashrc
from micromamba-docker.
Another interesting point on this topic would be to make the pre-installed tools available to any user. The scenario I describe is that I would create a Docker image derived from the micromamba image and install a couple of conda packages as root. Then I run that image with a non-root id, for example, docker run -u 1001:10001
.
In order for any user id to be able to use the conda packages, the BASH_ENV
should have permissions to be read by all (so maybe it should be in a different place), and /opt/conda
would need read permissions for all, as well as binaries need to be executable by all.
I would do all of this in my derived image definition but I wanted to ask for your feedback if you think that's a decent approach.
from micromamba-docker.
Related Issues (20)
- Switch from miniconda for Gitlab CI? HOT 4
- Use micromamba based container for CI with GitHub Actions HOT 8
- Install pip dependencies results a permission denied (libmamba Error opening for writing) HOT 1
- Micromamba not initializing correctly HOT 7
- Adding micromamba to an existing Docker image failing to prefix error HOT 2
- python not found on Singularity HOT 1
- Invalid argument when running pre/post link script HOT 3
- Properly document how to launch a shell in an image, not just a running container HOT 3
- Support multiple alpine base images
- Problem: Cannot add a corporate SSL certificate as update-ca-certificates tool was removed from the multistage final docker image HOT 4
- Unexpected behaviour with cuda. HOT 2
- gcc not found HOT 1
- Adding micromamba to an existing docker image documentation tip HOT 8
- Cannot install new package due to micromamba user permissions. HOT 3
- mambauser cannot write to bind mounts on Linux with Docker in rootless-mode HOT 17
- Failed to add Micromamba to another image HOT 2
- Apache 2.0 License missing copyright owner information HOT 1
- Cache accessing error when creating environments in containers from a derived image with host uid. HOT 11
- Question: can we pass extra-url to the env.yaml? HOT 3
- Should CONDA_PREFIX be set by default? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micromamba-docker.