Open huydhn opened 11 months ago
I think the problem comes from how the package is being specified:
conda install -c pytorch-nightly -c file:///Users/huydo/Downloads/distr distr::torchaudio
This will be understood as the distr
channel in anaconda.org
, not "a channel named distr
in the current list of channels". This might be a bug in conda-libmamba-solver
(easily fixable), but I find that behaviour surprising and I would have assumed that the following:
conda install -c pytorch-nightly -c file:///Users/huydo/Downloads/distr file:///Users/huydo/Downloads/distr::torchaudio
is more explicit and accurate. Does it work with this alternative syntax?
Ah wait, this is a bit hacky 🤔 In the distr
channel description, it says:
Empty channel whose sole purpose of testing local installs. This enables
conda install -c /path/to/distr distr::pkg
🤔 Is it because the osx-arm64 was not part of the default subdir collection when it was created?
I think you can use custom_channels
in .condarc
:
# # custom_channels (map: primitive)
# # A map of key-value pairs where the key is a channel name and the value
# # is a channel location. Channels defined here override the default
# # 'channel_alias' value. The channel name (key) is not included in the
# # channel location (value). For example, to override the location of
# # the 'conda-forge' channel where the url to repodata is
# # https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json,
# # add an entry 'conda-forge: https://anaconda-repo.dev/packages'.
# #
# custom_channels:
# pkgs/pro: https://repo.anaconda.com
to do something like this:
custom_channels:
distr: file:///path/to/Downloads/or/parent/directorty
Let me try with the custom channels config.
On the other hand, we have tried using the full name, i.e. conda install -c pytorch-nightly -c file:///Users/huydo/Downloads/distr file:///Users/huydo/Downloads/distr::torchaudio
, but it doesn't work and still refer to the remote distr channel https://github.com/pytorch/test-infra/actions/runs/7035821668/job/19147091795?pr=4767#step:13:152
it doesn't work and still refer to the remote distr channel
Ok, thanks! That's useful to know. I'll transfer this over to conda/conda-libmamba-solver.
Ran into a similar (same?) issue using the local
channel:
--solver=classic local::package
--solver=libmamba local::package
--solver=classic -c local package
--solver=libmamba -c local package
I am looking into this now. For the record, mamba
does not allow this either. Note we have to symlink the custom CONDA_BLD_PATH
into $CONDA_ROOT/conda-bld
so it's actually loaded:
(base) test_user@43aaa076cf48:/opt/conda-libmamba-solver-src$ sudo ln -s /opt/conda-libmamba-solver-
src/tests/data/mamba_repo /opt/conda/conda-bld
(base) test_user@43aaa076cf48:/opt/conda-libmamba-solver-src$ mamba install local::test-package
Looking for: ['local::test-package']
conda-forge/linux-aarch64 Using cache
conda-forge/noarch Using cache
opt/conda/conda-bld/linux-aarch64 (check zst) Checked 0.0s
opt/conda/conda-bld/noarch (check zst) Checked 0.0s
opt/conda/conda-bld/linux-aarch64 ??.?MB @ ??.?MB/s 0 failed 0.0s
opt/conda/conda-bld/noarch 586.0 B @ 394.9kB/s 0.0s
Pinned packages:
- python 3.11.*
Could not solve for environment specs
The following package could not be installed
└─ test-package does not exist (perhaps a typo or a missing channel).
(base) test_user@43aaa076cf48:/opt/conda-libmamba-solver-src$ mamba install -c local test-package
Looking for: ['test-package']
opt/conda/conda-bld/linux-aarch64 (check zst) Checked 0.0s
opt/conda/conda-bld/noarch (check zst) Checked 0.0s
conda-forge/linux-aarch64 Using cache
conda-forge/noarch Using cache
opt/conda/conda-bld/linux-aarch64 ??.?MB @ ??.?MB/s 0 failed 0.0s
opt/conda/conda-bld/noarch 586.0 B @ 535.2kB/s 0.0s
Pinned packages:
- python 3.11.*
Transaction
Prefix: /opt/conda
Updating specs:
- test-package
- ca-certificates
- certifi
- openssl
Package Version Build Channel Size
─────────────────────────────────────────────────────────────────
Install:
─────────────────────────────────────────────────────────────────
+ test-package 0.1 0 /opt/conda/conda-bld 6kB
Summary:
Install: 1 packages
Total download: 6kB
─────────────────────────────────────────────────────────────────
Confirm changes: [Y/n] N
One thing I noticed is that while following works,
conda install -c file:///home/isuru/distr distr::test-package --solver=classic
the following does not
conda install -c file:///home/isuru/distr2 distr2::test-package --solver=classic
because there is no distr2
channel in anaconda.org
. So, even though this is supposed to work, it feels like a hack.
Ran into a similar (same?) issue using the
local
channel:
FWIW conda install -c local local::test-package --solver=libmamba
doesn't work either.
I think we should allow the following
conda install -c local local::test-package --solver=libmamba
conda install -c file:///home/isuru/distr2 file:///home/isuru/distr2::test-package --solver=libmamba
but not allow
conda install -c file:///home/isuru/distr2 distr2::test-package --solver=libmamba
What do you think?
Yep, my gut tells me that the last one feels weird and happens to work. Sadly some folks are somehow relying on that (with some effort, though, given the existence of the remote distr
channel). As I said earlier, ergonomics like that belong to the local configuration. cc @conda/conda-core for input too.
conda install -c local local::test-package --solver=libmamba
Fixed in https://github.com/mamba-org/mamba/pull/3056
conda install -c file:///home/isuru/distr2 file:///home/isuru/distr2::test-package --solver=libmamba
I don't think the original issue is fixed. We need https://github.com/conda/conda/pull/13418 for a partial fix.
Checklist
What happened?
As part of PyTorch release workflow, we build conda release for PyTorch and other libraries like TorchAudio. As part of the process, we run smoke test to install the conda build artifacts locally with the following commands
conda install -c pytorch-nightly -c file:///Users/huydo/Downloads/distr distr::torchaudio
, and it starts to fail with the latest 23.10.0 conda release:Here are some observation:
Package Plan
environment location: /Users/huydo/miniconda3/envs/py3.9
added / updated specs:
The following packages will be downloaded:
Conda Config
Conda list
Additional Context
No response