Comments (6)
Hello @bchalk101, thank you for your interest in micromamba.
The output from micromamba install
is rather noisy and may have confused you. The key line of output is error No target prefix specified
indicating you did not supply all the required parameters.
docker exec test micromamba install -n base -c conda-forge -y openssl
would be the full command to install openssl into the base environment (and it works for me with mambaorg/micromamba:0.21.0). If you then want to execute a program within a conda environment via a docker exec
command, then you can make use of a new micromamba
feature:
docker exec test micromamba run openssl
or if you want to avoid the "μmamba" ascii banner, then you could do:
docker exec test /usr/local/bin/_entrypoint.sh openssl
With that information, are you able to do what you need?
from micromamba-docker.
Hi @wholtz, thank you for working on it!
So not exactly, I was wondering if it is possible in the same manner that you can run docker run -it --rm --name test mambaorg/micromamba micromamba install python -c conda-forge
and it activates the environment and runs the install within base
, could that be done with docker exec
.
The specific reason is that I have a Dockerfile, which installs python and other tools into the base conda environment within the image. I want to enable users to be able to run docker exec python <script>.py
and it uses the python from within the base environment as you would with docker run
, without having to use additional commands such as micromamba run
or /usr/local/bin/_entrypoint.sh
.
from micromamba-docker.
docker exec
does not appear to execute .bashrc
or .profile
so I don't see way to implement exactly what you want.
There are some other options that I don't consider to be "clean" as they run programs from the conda environment without activating the conda environment. By placing python
within $PATH
you can get the behavior you desire. You could set PATH
to include /opt/conda/bin
or you can symlink /opt/conda/bin/python
to /usr/local/bin/python
:
docker run -it --rm --name test -d mambaorg/micromamba
docker exec test micromamba install -c conda-forge -y -n base python
docker exec -u 0:0 test ln -s /opt/conda/bin/python /usr/local/bin/python
docker exec test python --version
from micromamba-docker.
Just to clarify,
docker run -it --rm --name test mambaorg/micromamba micromamba install python -c conda-forge -y -n base
works because micromamba
(which is not in a conda environment) is in /bin
which is within the default $PATH
.
from micromamba-docker.
@bchalk101 and @wholtz, in general, one possibility to achieve activation from docker exec
is
docker exec -it containername bash -i -c "command"
from micromamba-docker.
Closing as I don't see a way to enable the requested functionality.
from micromamba-docker.
Related Issues (20)
- Configuration file specified but does not exist HOT 6
- issues with conda python HOT 9
- Install pip dependencies HOT 17
- Document workaround for hang when using docker on macOS ARM HOT 11
- 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
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.