mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.91k stars 356 forks source link

How to export source channel for each package? #2371

Open Yura52 opened 1 year ago

Yura52 commented 1 year ago

Hi! Thanks for the great project!

I personally use micromamba, but the question applies to everything: conda, mamba, micromamba.

I would like to export an environment and then reproduce it on a different architecture. Currently, it looks impossible:

The export command is not crucial here, I am ready to assemble the file by hand if the format allows including channel information.

So basically I am looking for something like micromamba env export --save-channel-for-each-package

jonashaag commented 1 year ago

We will be adding that soonish, maybe in the next couple of weeks/months. If you need it more urgently I’m happy to help you to come up with a patch :)

jonashaag commented 1 year ago

Also do you know conda-lock?

Yura52 commented 1 year ago

Thank you for the quick reply! I was not aware of conda-lock, though after a quick look my impression is that conda-lock lacks this feature.

Also, it turned out that my case might be a bit more complicated than I thought, and now, I am less sure that the proposed idea is the one that would solve my issue.

jonashaag commented 1 year ago

OK! Feel free to let us know here what's your use case.

Btw, moving to different architectures may be complicated because packages generally have other dependencies on other architectures. Eg. some architectures might have MKL and others only have OpenBLAS.

Yura52 commented 1 year ago

Before I start, I would like to say that micromamba is such a cool thing! It is such a relief to have a single fast binary for managing environments.

Also, it looks like the above discussion about architectures does not apply to my case, sorry for the misleading first post. Both machines I have fall into the linux-64 category.

My setup is specific and makes it difficuilt to provide consice minimal examples, so I will talk only about one specific issue that to some extent illustrates the spirit of the problems.

On machine A, I installed PyTorch v1.13.1 with CUDA support with this command: micromamba install pytorch pytorch-cuda=11.7 -c pytorch -c nvidia -с conda-forge. Then I installed many more packages with a couple of micromamba install commands.

One of my attempts to reproduce the environment on machine B was based on this environment.yaml file:

```yaml name: main channels: - https://conda.anaconda.org/pytorch - https://conda.anaconda.org/nvidia - https://conda.anaconda.org/conda-forge - https://conda.anaconda.org/pyviz - nodefaults dependencies: - black=23.1.0 - bokeh=3.0.3 - category_encoders=2.6.0 - colorcet=3.0.1 - flake8=6.0.0 - holoviews=1.14.9 - icecream=2.1.3 - isort=5.12.0 - ipywidgets=8.0.4 - jupyterlab=3.6.1 - jupyterlab_code_formatter=1.5.3 - loguru=0.6.0 - matplotlib=3.7.1 - numpy=1.24.2 - optuna=3.1.0 - pandas=1.5.3 - pyarrow=11.0.0 - pytorch=1.13.1 - pytorch-cuda=11.7 - scikit-learn=1.2.2 - scipy=1.10.1 - seaborn=0.12.2 - tensorboard=2.12.0 - tomli=2.0.1 - tomli-w=1.0.0 - torchinfo=1.7.2 - tqdm=4.65.0 - voila=0.4.0 - xgboost ```

Below, I provide the result of micromamba install -f environment.yaml. The problem is that the suggested PyTorch is CPU-only and comes from the conda-forge channel.

``` Package Version Build Channel Size ────────────────────────────────────────────────────────────────────────────────────────────────────── Install: ────────────────────────────────────────────────────────────────────────────────────────────────────── + _libgcc_mutex 0.1 conda_forge conda-forge/linux-64 3kB + _openmp_mutex 4.5 2_kmp_llvm conda-forge/linux-64 6kB + _py-xgboost-mutex 2.0 cpu_0 conda-forge/linux-64 8kB + absl-py 1.4.0 pyhd8ed1ab_0 conda-forge/noarch 102kB + aiofiles 22.1.0 pyhd8ed1ab_0 conda-forge/noarch 18kB + aiohttp 3.8.4 py311h2582759_0 conda-forge/linux-64 554kB + aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge/noarch 13kB + aiosqlite 0.18.0 pyhd8ed1ab_0 conda-forge/noarch 19kB + alembic 1.10.2 pyhd8ed1ab_0 conda-forge/noarch 148kB + alsa-lib 1.2.8 h166bdaf_0 conda-forge/linux-64 592kB + anyio 3.6.2 pyhd8ed1ab_0 conda-forge/noarch 85kB + argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge/noarch 16kB + argon2-cffi-bindings 21.2.0 py311hd4cff14_3 conda-forge/linux-64 36kB + arrow-cpp 11.0.0 ha770c72_9_cpu conda-forge/linux-64 31kB + asttokens 2.2.1 pyhd8ed1ab_0 conda-forge/noarch 28kB + async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge/noarch 9kB + attr 2.5.1 h166bdaf_1 conda-forge/linux-64 71kB + attrs 22.2.0 pyh71513ae_0 conda-forge/noarch 54kB + aws-c-auth 0.6.25 haec726b_4 conda-forge/linux-64 95kB + aws-c-cal 0.5.21 hb6b25a1_1 conda-forge/linux-64 43kB + aws-c-common 0.8.12 h0b41bf4_0 conda-forge/linux-64 198kB + aws-c-compression 0.2.16 hea85486_4 conda-forge/linux-64 19kB + aws-c-event-stream 0.2.20 hddb6542_2 conda-forge/linux-64 54kB + aws-c-http 0.7.5 hdfd1699_3 conda-forge/linux-64 192kB + aws-c-io 0.13.18 hf4b7f4e_3 conda-forge/linux-64 143kB + aws-c-mqtt 0.8.6 hfdaba90_9 conda-forge/linux-64 144kB + aws-c-s3 0.2.5 hf4c50b5_5 conda-forge/linux-64 75kB + aws-c-sdkutils 0.1.7 hea85486_4 conda-forge/linux-64 52kB + aws-checksums 0.1.14 hea85486_4 conda-forge/linux-64 50kB + aws-crt-cpp 0.19.8 h30838a0_6 conda-forge/linux-64 319kB + aws-sdk-cpp 1.10.57 hd18c533_7 conda-forge/linux-64 4MB + babel 2.12.1 pyhd8ed1ab_1 conda-forge/noarch 7MB + backcall 0.2.0 pyh9f0ad1d_0 conda-forge/noarch 14kB + backports 1.0 pyhd8ed1ab_3 conda-forge/noarch 6kB + backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge/noarch 9kB + beautifulsoup4 4.11.2 pyha770c72_0 conda-forge/noarch 104kB + black 23.1.0 py311h38be061_0 conda-forge/linux-64 342kB + bleach 6.0.0 pyhd8ed1ab_0 conda-forge/noarch 131kB + blinker 1.5 pyhd8ed1ab_0 conda-forge/noarch 15kB + bokeh 3.0.3 pyhd8ed1ab_0 conda-forge/noarch 10MB + brotli 1.0.9 h166bdaf_8 conda-forge/linux-64 19kB + brotli-bin 1.0.9 h166bdaf_8 conda-forge/linux-64 20kB + brotlipy 0.7.0 py311hd4cff14_1005 conda-forge/linux-64 354kB + bzip2 1.0.8 h7f98852_4 conda-forge/linux-64 496kB + c-ares 1.18.1 h7f98852_0 conda-forge/linux-64 115kB + ca-certificates 2022.12.7 ha878542_0 conda-forge/linux-64 146kB + cachetools 5.3.0 pyhd8ed1ab_0 conda-forge/noarch 14kB + cairo 1.16.0 ha61ee94_1014 conda-forge/linux-64 2MB + category_encoders 2.6.0 pyhd8ed1ab_0 conda-forge/noarch 71kB + certifi 2022.12.7 pyhd8ed1ab_0 conda-forge/noarch 151kB + cffi 1.15.1 py311h409f033_3 conda-forge/linux-64 296kB + charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge/noarch 36kB + click 8.1.3 unix_pyhd8ed1ab_2 conda-forge/noarch 76kB + cmaes 0.9.1 pyhd8ed1ab_0 conda-forge/noarch 21kB + colorama 0.4.6 pyhd8ed1ab_0 conda-forge/noarch 25kB + colorcet 3.0.1 pyhd8ed1ab_0 conda-forge/noarch 2MB + colorlog 6.7.0 py311h38be061_1 conda-forge/linux-64 21kB + comm 0.1.2 pyhd8ed1ab_0 conda-forge/noarch 11kB + contourpy 1.0.7 py311ha3edf6b_0 conda-forge/linux-64 225kB + cryptography 39.0.2 py311h9b4c7bb_0 conda-forge/linux-64 2MB + cuda 11.7.1 0 nvidia/linux-64 1kB + cuda-cccl 11.7.91 0 nvidia/linux-64 1MB + cuda-command-line-tools 11.7.1 0 nvidia/linux-64 1kB + cuda-compiler 11.7.1 0 nvidia/linux-64 1kB + cuda-cudart 11.7.99 0 nvidia/linux-64 199kB + cuda-cudart-dev 11.7.99 0 nvidia/linux-64 1MB + cuda-cuobjdump 11.7.91 0 nvidia/linux-64 162kB + cuda-cupti 11.7.101 0 nvidia/linux-64 24MB + cuda-cuxxfilt 11.7.91 0 nvidia/linux-64 300kB + cuda-demo-suite 12.1.55 0 nvidia/linux-64 5MB + cuda-documentation 12.1.55 0 nvidia/linux-64 91kB + cuda-driver-dev 11.7.99 0 nvidia/linux-64 16kB + cuda-gdb 12.1.55 0 nvidia/linux-64 6MB + cuda-libraries 11.7.1 0 nvidia/linux-64 2kB + cuda-libraries-dev 11.7.1 0 nvidia/linux-64 2kB + cuda-memcheck 11.8.86 0 nvidia/linux-64 172kB + cuda-nsight 12.1.55 0 nvidia/linux-64 119MB + cuda-nsight-compute 12.1.0 0 nvidia/linux-64 1kB + cuda-nvcc 11.7.99 0 nvidia/linux-64 45MB + cuda-nvdisasm 12.1.55 0 nvidia/linux-64 50MB + cuda-nvml-dev 11.7.91 0 nvidia/linux-64 82kB + cuda-nvprof 12.1.55 0 nvidia/linux-64 5MB + cuda-nvprune 11.7.91 0 nvidia/linux-64 65kB + cuda-nvrtc 11.7.99 0 nvidia/linux-64 18MB + cuda-nvrtc-dev 11.7.99 0 nvidia/linux-64 18MB + cuda-nvtx 11.7.91 0 nvidia/linux-64 58kB + cuda-nvvp 12.1.55 0 nvidia/linux-64 120MB + cuda-runtime 11.7.1 0 nvidia/linux-64 1kB + cuda-sanitizer-api 12.1.55 0 nvidia/linux-64 18MB + cuda-toolkit 11.7.1 0 nvidia/linux-64 1kB + cuda-tools 11.7.1 0 nvidia/linux-64 1kB + cuda-visual-tools 11.7.1 0 nvidia/linux-64 1kB + cycler 0.11.0 pyhd8ed1ab_0 conda-forge/noarch 10kB + dbus 1.13.6 h5008d03_3 conda-forge/linux-64 619kB + debugpy 1.6.6 py311hcafe171_0 conda-forge/linux-64 2MB + decorator 5.1.1 pyhd8ed1ab_0 conda-forge/noarch 12kB + defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge/noarch 24kB + entrypoints 0.4 pyhd8ed1ab_0 conda-forge/noarch 9kB + executing 1.2.0 pyhd8ed1ab_0 conda-forge/noarch 25kB + expat 2.5.0 h27087fc_0 conda-forge/linux-64 194kB + fftw 3.3.10 nompi_hf0379b8_106 conda-forge/linux-64 2MB + flake8 6.0.0 pyhd8ed1ab_0 conda-forge/noarch 109kB + flit-core 3.8.0 pyhd8ed1ab_0 conda-forge/noarch 46kB + font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge/noarch 397kB + font-ttf-inconsolata 3.000 h77eed37_0 conda-forge/noarch 97kB + font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge/noarch 701kB + font-ttf-ubuntu 0.83 hab24e00_0 conda-forge/noarch 2MB + fontconfig 2.14.2 h14ed4e7_0 conda-forge/linux-64 272kB + fonts-conda-ecosystem 1 0 conda-forge/noarch 4kB + fonts-conda-forge 1 0 conda-forge/noarch 4kB + fonttools 4.39.0 py311h2582759_0 conda-forge/linux-64 3MB + freetype 2.12.1 hca18f0e_1 conda-forge/linux-64 626kB + frozenlist 1.3.3 py311hd4cff14_0 conda-forge/linux-64 46kB + gds-tools 1.6.0.25 0 nvidia/linux-64 43MB + gettext 0.21.1 h27087fc_0 conda-forge/linux-64 4MB + gflags 2.2.2 he1b5a44_1004 conda-forge/linux-64 117kB + glib 2.74.1 h6239696_1 conda-forge/linux-64 486kB + glib-tools 2.74.1 h6239696_1 conda-forge/linux-64 109kB + glog 0.6.0 h6f12383_0 conda-forge/linux-64 114kB + google-auth 2.16.2 pyh1a96a4e_0 conda-forge/noarch 99kB + google-auth-oauthlib 0.4.6 pyhd8ed1ab_0 conda-forge/noarch 19kB + graphite2 1.3.13 h58526e2_1001 conda-forge/linux-64 105kB + greenlet 2.0.2 py311hcafe171_0 conda-forge/linux-64 213kB + grpcio 1.51.1 py311hcafe171_3 conda-forge/linux-64 789kB + gst-plugins-base 1.22.0 h4243ec0_2 conda-forge/linux-64 3MB + gstreamer 1.22.0 h25f0c4b_2 conda-forge/linux-64 2MB + gstreamer-orc 0.4.33 h166bdaf_0 conda-forge/linux-64 306kB + harfbuzz 6.0.0 h8e241bc_0 conda-forge/linux-64 1MB + holoviews 1.14.9 pyhd8ed1ab_0 conda-forge/noarch 4MB + icecream 2.1.3 pyhd8ed1ab_0 conda-forge/noarch 13kB + icu 70.1 h27087fc_0 conda-forge/linux-64 14MB + idna 3.4 pyhd8ed1ab_0 conda-forge/noarch 57kB + importlib-metadata 6.0.0 pyha770c72_0 conda-forge/noarch 25kB + importlib_metadata 6.0.0 hd8ed1ab_0 conda-forge/noarch 9kB + importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge/noarch 31kB + ipykernel 6.21.3 pyh210e3f2_0 conda-forge/noarch 111kB + ipython 8.11.0 pyh41d4057_0 conda-forge/noarch 579kB + ipython_genutils 0.2.0 py_1 conda-forge/noarch 22kB + ipywidgets 8.0.4 pyhd8ed1ab_0 conda-forge/noarch 111kB + isort 5.12.0 pyhd8ed1ab_1 conda-forge/noarch 73kB + jack 1.9.22 h11f4161_0 conda-forge/linux-64 464kB + jedi 0.18.2 pyhd8ed1ab_0 conda-forge/noarch 804kB + jinja2 3.1.2 pyhd8ed1ab_1 conda-forge/noarch 101kB + joblib 1.2.0 pyhd8ed1ab_0 conda-forge/noarch 210kB + jpeg 9e h0b41bf4_3 conda-forge/linux-64 240kB + json5 0.9.5 pyh9f0ad1d_0 conda-forge/noarch 21kB + jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge/noarch 70kB + jupyter_client 7.4.1 pyhd8ed1ab_0 conda-forge/noarch 93kB + jupyter_core 5.2.0 py311h38be061_0 conda-forge/linux-64 115kB + jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge/noarch 77kB + jupyter_server 1.23.6 pyhd8ed1ab_0 conda-forge/noarch 244kB + jupyter_server_fileid 0.8.0 pyhd8ed1ab_0 conda-forge/noarch 19kB + jupyter_server_ydoc 0.6.1 pyhd8ed1ab_0 conda-forge/noarch 15kB + jupyter_ydoc 0.2.2 pyhd8ed1ab_0 conda-forge/noarch 10kB + jupyterlab 3.6.1 pyhd8ed1ab_0 conda-forge/noarch 5MB + jupyterlab_code_formatter 1.5.3 pyhd8ed1ab_0 conda-forge/noarch 25kB + jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge/noarch 17kB + jupyterlab_server 2.20.0 pyhd8ed1ab_0 conda-forge/noarch 60kB + jupyterlab_widgets 3.0.5 pyhd8ed1ab_0 conda-forge/noarch 173kB + keyutils 1.6.1 h166bdaf_0 conda-forge/linux-64 118kB + kiwisolver 1.4.4 py311h4dd048b_1 conda-forge/linux-64 77kB + krb5 1.20.1 h81ceb04_0 conda-forge/linux-64 1MB + lame 3.100 h166bdaf_1003 conda-forge/linux-64 508kB + lcms2 2.15 hfd0df8a_0 conda-forge/linux-64 241kB + ld_impl_linux-64 2.40 h41732ed_0 conda-forge/linux-64 705kB + lerc 4.0.0 h27087fc_0 conda-forge/linux-64 282kB + libabseil 20230125.0 cxx17_hcb278e6_1 conda-forge/linux-64 1MB + libarrow 11.0.0 h33598ff_9_cpu conda-forge/linux-64 27MB + libblas 3.9.0 16_linux64_openblas conda-forge/linux-64 13kB + libbrotlicommon 1.0.9 h166bdaf_8 conda-forge/linux-64 67kB + libbrotlidec 1.0.9 h166bdaf_8 conda-forge/linux-64 34kB + libbrotlienc 1.0.9 h166bdaf_8 conda-forge/linux-64 295kB + libcap 2.66 ha37c62d_0 conda-forge/linux-64 100kB + libcblas 3.9.0 16_linux64_openblas conda-forge/linux-64 13kB + libclang 15.0.7 default_had23c3d_1 conda-forge/linux-64 133kB + libclang13 15.0.7 default_h3e3d535_1 conda-forge/linux-64 10MB + libcrc32c 1.1.2 h9c3ff4c_0 conda-forge/linux-64 20kB + libcublas 11.10.3.66 0 nvidia/linux-64 300MB + libcublas-dev 11.10.3.66 0 nvidia/linux-64 311MB + libcufft 10.7.2.124 h4fbf590_0 nvidia/linux-64 98MB + libcufft-dev 10.7.2.124 h98a8f43_0 nvidia/linux-64 207MB + libcufile 1.6.0.25 0 nvidia/linux-64 782kB + libcufile-dev 1.6.0.25 0 nvidia/linux-64 13kB + libcups 2.3.3 h36d4200_3 conda-forge/linux-64 5MB + libcurand 10.3.2.56 0 nvidia/linux-64 54MB + libcurand-dev 10.3.2.56 0 nvidia/linux-64 460kB + libcurl 7.88.1 hdc1c0ab_0 conda-forge/linux-64 358kB + libcusolver 11.4.0.1 0 nvidia/linux-64 83MB + libcusolver-dev 11.4.0.1 0 nvidia/linux-64 59MB + libcusparse 11.7.4.91 0 nvidia/linux-64 158MB + libcusparse-dev 11.7.4.91 0 nvidia/linux-64 325MB + libdb 6.2.32 h9c3ff4c_0 conda-forge/linux-64 24MB + libdeflate 1.17 h0b41bf4_0 conda-forge/linux-64 65kB + libedit 3.1.20191231 he28a2e2_2 conda-forge/linux-64 124kB + libev 4.33 h516909a_1 conda-forge/linux-64 106kB + libevent 2.1.10 h28343ad_4 conda-forge/linux-64 1MB + libffi 3.4.2 h7f98852_5 conda-forge/linux-64 58kB + libflac 1.4.2 h27087fc_0 conda-forge/linux-64 421kB + libgcc-ng 12.2.0 h65d4601_19 conda-forge/linux-64 954kB + libgcrypt 1.10.1 h166bdaf_0 conda-forge/linux-64 720kB + libgfortran-ng 12.2.0 h69a702a_19 conda-forge/linux-64 23kB + libgfortran5 12.2.0 h337968e_19 conda-forge/linux-64 2MB + libglib 2.74.1 h606061b_1 conda-forge/linux-64 3MB + libgoogle-cloud 2.8.0 h3c06191_0 conda-forge/linux-64 38MB + libgpg-error 1.46 h620e276_0 conda-forge/linux-64 258kB + libgrpc 1.51.1 hcf146ea_3 conda-forge/linux-64 5MB + libhwloc 2.9.0 hd6dc26d_0 conda-forge/linux-64 3MB + libiconv 1.17 h166bdaf_0 conda-forge/linux-64 1MB + liblapack 3.9.0 16_linux64_openblas conda-forge/linux-64 13kB + libllvm15 15.0.7 hadd5161_0 conda-forge/linux-64 33MB + libnghttp2 1.52.0 h61bc06f_0 conda-forge/linux-64 622kB + libnpp 11.7.4.75 0 nvidia/linux-64 136MB + libnpp-dev 11.7.4.75 0 nvidia/linux-64 133MB + libnsl 2.0.0 h7f98852_0 conda-forge/linux-64 31kB + libnvjpeg 11.8.0.2 0 nvidia/linux-64 2MB + libnvjpeg-dev 11.8.0.2 0 nvidia/linux-64 2MB + libogg 1.3.4 h7f98852_1 conda-forge/linux-64 211kB + libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge/linux-64 11MB + libopus 1.3.1 h7f98852_1 conda-forge/linux-64 261kB + libpng 1.6.39 h753d276_0 conda-forge/linux-64 283kB + libpq 15.2 hb675445_0 conda-forge/linux-64 2MB + libprotobuf 3.21.12 h3eb15da_0 conda-forge/linux-64 2MB + libsndfile 1.2.0 hb75c966_0 conda-forge/linux-64 350kB + libsodium 1.0.18 h36c2ea0_1 conda-forge/linux-64 375kB + libsqlite 3.40.0 h753d276_0 conda-forge/linux-64 810kB + libssh2 1.10.0 hf14f497_3 conda-forge/linux-64 239kB + libstdcxx-ng 12.2.0 h46fd767_19 conda-forge/linux-64 4MB + libsystemd0 252 h2a991cd_0 conda-forge/linux-64 393kB + libthrift 0.18.0 h5e4af38_0 conda-forge/linux-64 4MB + libtiff 4.5.0 h6adf6a1_2 conda-forge/linux-64 407kB + libtool 2.4.7 h27087fc_0 conda-forge/linux-64 412kB + libudev1 253 h0b41bf4_0 conda-forge/linux-64 119kB + libutf8proc 2.8.0 h166bdaf_0 conda-forge/linux-64 101kB + libuuid 2.32.1 h7f98852_1000 conda-forge/linux-64 28kB + libvorbis 1.3.7 h9c3ff4c_0 conda-forge/linux-64 286kB + libwebp-base 1.2.4 h166bdaf_0 conda-forge/linux-64 413kB + libxcb 1.13 h7f98852_1004 conda-forge/linux-64 400kB + libxgboost 1.7.1 cpu_ha3b9936_0 conda-forge/linux-64 4MB + libxkbcommon 1.5.0 h79f4944_0 conda-forge/linux-64 562kB + libxml2 2.10.3 h7463322_0 conda-forge/linux-64 773kB + libzlib 1.2.13 h166bdaf_4 conda-forge/linux-64 66kB + llvm-openmp 15.0.7 h0cdce71_0 conda-forge/linux-64 3MB + loguru 0.6.0 py311h38be061_2 conda-forge/linux-64 115kB + lz4-c 1.9.4 hcb278e6_0 conda-forge/linux-64 143kB + mako 1.2.4 pyhd8ed1ab_0 conda-forge/noarch 63kB + markdown 3.4.1 pyhd8ed1ab_0 conda-forge/noarch 66kB + markupsafe 2.1.2 py311h2582759_0 conda-forge/linux-64 26kB + matplotlib 3.7.1 py311h38be061_0 conda-forge/linux-64 8kB + matplotlib-base 3.7.1 py311h8597a09_0 conda-forge/linux-64 8MB + matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge/noarch 12kB + mccabe 0.7.0 pyhd8ed1ab_0 conda-forge/noarch 11kB + mistune 2.0.5 pyhd8ed1ab_0 conda-forge/noarch 74kB + mkl 2022.2.1 h84fe81f_16997 conda-forge/linux-64 165MB + mpg123 1.31.2 hcb278e6_0 conda-forge/linux-64 485kB + multidict 6.0.4 py311h2582759_0 conda-forge/linux-64 57kB + munkres 1.1.4 pyh9f0ad1d_0 conda-forge/noarch 12kB + mypy_extensions 1.0.0 pyha770c72_0 conda-forge/noarch 10kB + mysql-common 8.0.32 ha901b37_0 conda-forge/linux-64 744kB + mysql-libs 8.0.32 hd7da12d_0 conda-forge/linux-64 2MB + nbclassic 0.5.3 pyhb4ecaf3_3 conda-forge/noarch 6MB + nbclient 0.7.2 pyhd8ed1ab_0 conda-forge/noarch 62kB + nbconvert 7.2.9 pyhd8ed1ab_0 conda-forge/noarch 8kB + nbconvert-core 7.2.9 pyhd8ed1ab_0 conda-forge/noarch 200kB + nbconvert-pandoc 7.2.9 pyhd8ed1ab_0 conda-forge/noarch 6kB + nbformat 5.7.3 pyhd8ed1ab_0 conda-forge/noarch 100kB + ncurses 6.3 h27087fc_1 conda-forge/linux-64 1MB + nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge/noarch 10kB + notebook 6.5.3 pyha770c72_0 conda-forge/noarch 307kB + notebook-shim 0.2.2 pyhd8ed1ab_0 conda-forge/noarch 15kB + nsight-compute 2023.1.0.15 0 nvidia/linux-64 808MB + nspr 4.35 h27087fc_0 conda-forge/linux-64 227kB + nss 3.89 he45b914_0 conda-forge/linux-64 2MB + numpy 1.24.2 py311h8e6699e_0 conda-forge/linux-64 8MB + oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge/noarch 92kB + openjpeg 2.5.0 hfec8fc6_2 conda-forge/linux-64 352kB + openssl 3.0.8 h0b41bf4_0 conda-forge/linux-64 3MB + optuna 3.1.0 pyhd8ed1ab_0 conda-forge/noarch 218kB + orc 1.8.2 hfdbbad2_2 conda-forge/linux-64 907kB + packaging 23.0 pyhd8ed1ab_0 conda-forge/noarch 41kB + pandas 1.5.3 py311h2872171_0 conda-forge/linux-64 14MB + pandoc 2.19.2 h32600fe_2 conda-forge/linux-64 27MB + pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge/noarch 12kB + panel 0.10.3 py_0 pyviz/noarch 6MB + param 1.12.3 pyh1a96a4e_0 conda-forge/noarch 80kB + parquet-cpp 1.5.1 2 conda-forge/noarch 3kB + parso 0.8.3 pyhd8ed1ab_0 conda-forge/noarch 71kB + pathspec 0.11.0 pyhd8ed1ab_0 conda-forge/noarch 37kB + patsy 0.5.3 pyhd8ed1ab_0 conda-forge/noarch 194kB + pcre2 10.40 hc3806b6_0 conda-forge/linux-64 2MB + pexpect 4.8.0 pyh1a96a4e_2 conda-forge/noarch 49kB + pickleshare 0.7.5 py_1003 conda-forge/noarch 9kB + pillow 9.4.0 py311h50def17_1 conda-forge/linux-64 47MB + pip 23.0.1 pyhd8ed1ab_0 conda-forge/noarch 1MB + pixman 0.40.0 h36c2ea0_0 conda-forge/linux-64 643kB + pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge/noarch 9kB + platformdirs 3.1.0 pyhd8ed1ab_0 conda-forge/noarch 17kB + ply 3.11 py_1 conda-forge/noarch 45kB + pooch 1.7.0 pyhd8ed1ab_0 conda-forge/noarch 51kB + prometheus_client 0.16.0 pyhd8ed1ab_0 conda-forge/noarch 52kB + prompt-toolkit 3.0.38 pyha770c72_0 conda-forge/noarch 269kB + prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge/noarch 6kB + protobuf 4.21.12 py311hcafe171_0 conda-forge/linux-64 389kB + psutil 5.9.4 py311hd4cff14_0 conda-forge/linux-64 497kB + pthread-stubs 0.4 h36c2ea0_1001 conda-forge/linux-64 6kB + ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge/noarch 17kB + pulseaudio 16.1 ha8d29e2_1 conda-forge/linux-64 2MB + pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge/noarch 15kB + py-xgboost 1.7.1 cpu_py311h4b67847_0 conda-forge/linux-64 292kB + pyarrow 11.0.0 py311hbdf6286_9_cpu conda-forge/linux-64 4MB + pyasn1 0.4.8 py_0 conda-forge/noarch 54kB + pyasn1-modules 0.2.7 py_0 conda-forge/noarch 61kB + pycodestyle 2.10.0 pyhd8ed1ab_0 conda-forge/noarch 43kB + pycparser 2.21 pyhd8ed1ab_0 conda-forge/noarch 103kB + pyct 0.4.6 py_0 conda-forge/noarch 3kB + pyct-core 0.4.6 py_0 conda-forge/noarch 14kB + pyflakes 3.0.1 pyhd8ed1ab_0 conda-forge/noarch 57kB + pygments 2.14.0 pyhd8ed1ab_0 conda-forge/noarch 824kB + pyjwt 2.6.0 pyhd8ed1ab_0 conda-forge/noarch 21kB + pyopenssl 23.0.0 pyhd8ed1ab_0 conda-forge/noarch 127kB + pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge/noarch 81kB + pyqt 5.15.7 py311ha74522f_3 conda-forge/linux-64 5MB + pyqt5-sip 12.11.0 py311hcafe171_3 conda-forge/linux-64 85kB + pyrsistent 0.19.3 py311h2582759_0 conda-forge/linux-64 124kB + pysocks 1.7.1 pyha2e5f31_6 conda-forge/noarch 19kB + python 3.11.0 he550d4f_1_cpython conda-forge/linux-64 31MB + python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge/noarch 246kB + python-fastjsonschema 2.16.3 pyhd8ed1ab_0 conda-forge/noarch 225kB + python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge/noarch 13kB + python_abi 3.11 3_cp311 conda-forge/linux-64 6kB + pytorch 1.13.1 cpu_py311h410fd25_1 conda-forge/linux-64 61MB + pytorch-cuda 11.7 h67b0de4_1 pytorch/noarch 3kB + pytz 2022.7.1 pyhd8ed1ab_0 conda-forge/noarch 186kB + pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge/noarch 32kB + pyviz_comms 2.2.1 pyhd8ed1ab_1 conda-forge/noarch 32kB + pyyaml 6.0 py311hd4cff14_5 conda-forge/linux-64 207kB + pyzmq 25.0.0 py311hd6ccaeb_0 conda-forge/linux-64 516kB + qt-main 5.15.8 h5d23da1_6 conda-forge/linux-64 52MB + re2 2023.02.02 hcb278e6_0 conda-forge/linux-64 201kB + readline 8.1.2 h0f457ee_0 conda-forge/linux-64 298kB + requests 2.28.2 pyhd8ed1ab_0 conda-forge/noarch 57kB + requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge/noarch 22kB + rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge/noarch 8kB + rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge/noarch 8kB + rsa 4.9 pyhd8ed1ab_0 conda-forge/noarch 30kB + s2n 1.3.38 h3358134_0 conda-forge/linux-64 362kB + scikit-learn 1.2.2 py311h67c5ca5_0 conda-forge/linux-64 9MB + scipy 1.10.1 py311h8e6699e_0 conda-forge/linux-64 26MB + seaborn 0.12.2 hd8ed1ab_0 conda-forge/noarch 6kB + seaborn-base 0.12.2 pyhd8ed1ab_0 conda-forge/noarch 232kB + send2trash 1.8.0 pyhd8ed1ab_0 conda-forge/noarch 18kB + setuptools 67.6.0 pyhd8ed1ab_0 conda-forge/noarch 579kB + sip 6.7.7 py311hcafe171_0 conda-forge/linux-64 583kB + six 1.16.0 pyh6c4a22f_0 conda-forge/noarch 14kB + sleef 3.5.1 h9b69904_2 conda-forge/linux-64 2MB + snappy 1.1.10 h9fff704_0 conda-forge/linux-64 39kB + sniffio 1.3.0 pyhd8ed1ab_0 conda-forge/noarch 14kB + soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge/noarch 35kB + sqlalchemy 2.0.5.post1 py311h2582759_0 conda-forge/linux-64 3MB + stack_data 0.6.2 pyhd8ed1ab_0 conda-forge/noarch 26kB + statsmodels 0.13.5 py311h4c7f6c3_2 conda-forge/linux-64 13MB + tbb 2021.8.0 hf52228f_0 conda-forge/linux-64 2MB + tensorboard 2.12.0 pyhd8ed1ab_0 conda-forge/noarch 5MB + tensorboard-data-server 0.7.0 py311h9b4c7bb_0 conda-forge/linux-64 5MB + tensorboard-plugin-wit 1.8.1 pyhd8ed1ab_0 conda-forge/noarch 685kB + terminado 0.17.1 pyh41d4057_0 conda-forge/noarch 21kB + threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge/noarch 18kB + tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge/noarch 23kB + tk 8.6.12 h27826a3_0 conda-forge/linux-64 3MB + toml 0.10.2 pyhd8ed1ab_0 conda-forge/noarch 18kB + tomli 2.0.1 pyhd8ed1ab_0 conda-forge/noarch 16kB + tomli-w 1.0.0 pyhd8ed1ab_0 conda-forge/noarch 10kB + torchinfo 1.7.2 pyhd8ed1ab_0 conda-forge/noarch 25kB + tornado 6.2 py311hd4cff14_1 conda-forge/linux-64 885kB + tqdm 4.65.0 pyhd8ed1ab_1 conda-forge/noarch 88kB + traitlets 5.9.0 pyhd8ed1ab_0 conda-forge/noarch 98kB + typing-extensions 4.4.0 hd8ed1ab_0 conda-forge/noarch 9kB + typing_extensions 4.4.0 pyha770c72_0 conda-forge/noarch 30kB + tzdata 2022g h191b570_0 conda-forge/noarch 108kB + urllib3 1.26.14 pyhd8ed1ab_0 conda-forge/noarch 113kB + voila 0.4.0 pyhd8ed1ab_0 conda-forge/noarch 5MB + wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge/noarch 29kB + webencodings 0.5.1 py_1 conda-forge/noarch 12kB + websocket-client 1.5.1 pyhd8ed1ab_0 conda-forge/noarch 44kB + websockets 10.4 py311hd4cff14_1 conda-forge/linux-64 161kB + werkzeug 2.2.3 pyhd8ed1ab_0 conda-forge/noarch 253kB + wheel 0.38.4 pyhd8ed1ab_0 conda-forge/noarch 33kB + widgetsnbextension 4.0.5 pyhd8ed1ab_0 conda-forge/noarch 824kB + xcb-util 0.4.0 h166bdaf_0 conda-forge/linux-64 21kB + xcb-util-image 0.4.0 h166bdaf_0 conda-forge/linux-64 24kB + xcb-util-keysyms 0.4.0 h166bdaf_0 conda-forge/linux-64 12kB + xcb-util-renderutil 0.3.9 h166bdaf_0 conda-forge/linux-64 16kB + xcb-util-wm 0.4.1 h166bdaf_0 conda-forge/linux-64 57kB + xgboost 1.7.1 cpu_py311h4b67847_0 conda-forge/linux-64 13kB + xorg-kbproto 1.0.7 h7f98852_1002 conda-forge/linux-64 27kB + xorg-libice 1.0.10 h7f98852_0 conda-forge/linux-64 59kB + xorg-libsm 1.2.3 hd9c2040_1000 conda-forge/linux-64 26kB + xorg-libx11 1.8.4 h0b41bf4_0 conda-forge/linux-64 830kB + xorg-libxau 1.0.9 h7f98852_0 conda-forge/linux-64 13kB + xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge/linux-64 19kB + xorg-libxext 1.3.4 h0b41bf4_2 conda-forge/linux-64 50kB + xorg-libxrender 0.9.10 h7f98852_1003 conda-forge/linux-64 33kB + xorg-renderproto 0.11.1 h7f98852_1002 conda-forge/linux-64 10kB + xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge/linux-64 30kB + xorg-xproto 7.0.31 h7f98852_1007 conda-forge/linux-64 75kB + xyzservices 2023.2.0 pyhd8ed1ab_0 conda-forge/noarch 36kB + xz 5.2.6 h166bdaf_0 conda-forge/linux-64 418kB + y-py 0.5.9 py311hfe55011_0 conda-forge/linux-64 1MB + yaml 0.2.5 h7f98852_2 conda-forge/linux-64 89kB + yarl 1.8.2 py311hd4cff14_0 conda-forge/linux-64 98kB + ypy-websocket 0.8.2 pyhd8ed1ab_0 conda-forge/noarch 17kB + zeromq 4.3.4 h9c3ff4c_1 conda-forge/linux-64 360kB + zipp 3.15.0 pyhd8ed1ab_0 conda-forge/noarch 17kB + zlib 1.2.13 h166bdaf_4 conda-forge/linux-64 94kB + zstd 1.5.2 h3eb15da_6 conda-forge/linux-64 420kB Summary: Install: 414 packages Total download: 4GB ```

So instead of environment.yaml file, I currently maintain a sequence of micromamba install commands with the right channels and package versions. Overall, this workaround is good enough for me.

P.S. I have just encountered this issue. So there is a syntax for package-wise channels or is it a conda-specific thing?

jonashaag commented 1 year ago

Quick reply to your question, there is channel::package but I’m not sure it works currently

jonashaag commented 1 year ago

Also I think you should be able to force GPU using pytorch =… =*cuda*

Yura52 commented 1 year ago

Wow, I was not aware of this syntax. Is there a documentation for theenvironment.yaml format?

jonashaag commented 1 year ago

I don’t find the Conda docs particularly approachable but here is some documentation on the version spec part https://docs.conda.io/projects/conda-build/en/stable/resources/package-spec.html#package-match-specifications

Yura52 commented 1 year ago

@jonashaag hi! The --channel-subdir is a great addition to micromamba 1.5.1! Do I understand correctly that this does not change the state of this specific issue? I mean this part:

I would like to export an environment and then reproduce it on a different architecture. Currently, it looks impossible

Because the result of -subdir part looks platform-specific.

jonashaag commented 1 year ago

You can't because some packages are not available on some architectures.

Can you please provide info on your exact use case?

Yura52 commented 1 year ago

First, I should say that my issue is not urgent nor critical, so if it feels like out of scope, feel free to close this issue. In any case, the new --channel-subdir is already a great feature that will improve my setup.

I am a machine learning researcher, and it often happens that I work on one project using two machines:

I wonder what is the best way to maintain environment files in this case to keep the two machines somewhat in sync? Additional context:

My current solution (simplified for the sake of clarity) is to manually compose and support environment-macos.yaml file where I only list packages directly imported by my code.

jonashaag commented 1 year ago

Having some packages installed for some platforms only is not supported by Conda syntax. Although it is supported by a Mamba specific feature: sel(...). I think you can find an example in one of the environment files in this very repo.

I think the best you can do is a relatively strictly pinned environment file.

Yura52 commented 1 year ago

I see, thanks for the prompt reply!