Source: conda-forge/dvc-feedstock#240 (comment)
The exact procedure is as follows.
Use the following as a template:
docker run --rm -it condaforge/mambaforge:4.10.2-0
mamba install -y conda-lock
cat <<EOF > env.yaml
name: conda-lock-dvc
channels:
- conda-forge
dependencies:
- [DEPENDENCIES TO BE ADDED HERE]
EOF
conda-lock -f env.yaml -p win-64 --mamba
To build the dependency list, I copy-paste from meta.yaml
from the core dvc run requirements, and then append any additional dvc-ssh
run requirements, in this case just
- sshfs ==2021.8.1
Then I go back and modify everything for the selected environment. Namely, I change - python
to - python =3.9
, and I manually delete the lines which would be excluded by selectors, in this case
- speedcopy >=2.0.1 # [py<38 and win]
- dataclasses ==0.7 # [py<37]
- importlib-metadata >=1.4 # [py<38]
End result is:
docker run --rm -it condaforge/mambaforge:4.10.2-0
mamba install -y conda-lock
cat <<EOF > env.yaml
name: conda-lock-dvc
channels:
- conda-forge
dependencies:
- python =3.9
- ply >=3.9
- colorama >=0.3.9
- configobj >=5.0.6
- gitpython >3
- dulwich >=0.20.23
- pygit2 >=1.5.0
- setuptools >=34.0.0
- nanotime >=0.5.2
- pyasn1 >=0.4.1
- voluptuous >=0.11.7
- requests >=2.22.0
- grandalf ==0.6
- distro >=1.3.0
- appdirs >=1.4.3
- ruamel.yaml >=0.17.11
- toml >=0.10.1
- funcy >=1.14
- pathspec >=0.6.0,<0.9.0
- shortuuid >=0.5.0
- tqdm >=4.45.0,<5
- packaging >=19.0
- zc.lockfile >=1.2.1
- flufl.lock >=3.2,<4
- win_unicode_console >=0.5 # [win]
- pywin32 >=225 # [win]
- networkx >=2.5
- psutil >=5.8.0
- pydot >=1.2.4
- flatten-dict >=0.4.1,<1
- tabulate >=0.8.7
- pygtrie >=2.3.2
- dpath >=2.0.1,<3
- shtab >=1.3.4,<2
- rich >=10.0.0
- dictdiffer >=0.8.1
- python-benedict >=0.21.1
- pyparsing ==2.4.7
- typing_extensions >=3.10.0.2
- fsspec ==2021.8.1
- aiohttp-retry ==2.4.5
- diskcache >=5.2.1
- git
- pip
- sshfs ==2021.8.1
EOF
conda-lock -f env.yaml -p win-64 --mamba
And that's it! That allowed me to produce the above error message within in seconds. Hopefully there's no mystery now. Let me know if you have any questions!