fast-honey-9693
06/01/2023, 5:43 PM"nvidia::pytorch-cuda": "11.7" in the @conda decorator, but am getting this error when metaflow tries to build the conda env:
Bootstrapping conda environment...(this could take a few minutes)
Conda ran into an error while setting up environment.:
Step: start, Error: PackagesNotFoundError: The following packages are not available from current channels:
- nvidia::pytorch-cuda==11.7
Current channels:
- <https://conda.anaconda.org/pytorch/linux-64>
- <https://conda.anaconda.org/pytorch/noarch>
- <https://conda.anaconda.org/conda-forge/linux-64>
- <https://conda.anaconda.org/conda-forge/noarch>
- <https://repo.anaconda.com/pkgs/main/linux-64>
- <https://repo.anaconda.com/pkgs/main/noarch>
- <https://repo.anaconda.com/pkgs/r/linux-64>
- <https://repo.anaconda.com/pkgs/r/noarch>
if I try to use conda directly to do the same thing, conda is able to find the package:
CONDA_SUBDIR=linux-64 conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
finds
pytorch-cuda pytorch/linux-64::pytorch-cuda-11.7-h778d358_5
i feel like i'm missing something. any clues?fast-honey-9693
06/01/2023, 5:44 PM"""
dead simple flow to make sure metaflow things are working like you expect
"""
from metaflow import batch, environment, FlowSpec, conda, resources, step
import sys
class Flow(FlowSpec):
@batch(gpu=1, host_volumes="/data")
# @batch(host_volumes="/data")
@conda(
libraries={
"pytorch::pytorch": "1.13.1",
"pytorch::torchvision": "0.14.1",
"nvidia::pytorch-cuda": "11.7",
},
python="3.10.6",
)
@environment(vars={"NVIDIA_DRIVER_CAPABILITIES": "compute,utility"})
@step
def start(self):
print(f"step executable: {sys.executable}")
from pathlib import Path
import torch
import os
print(f"cuda is available: {torch.cuda.is_available()}")
test_file = Path("/data/test_file.txt")
test_text = "hello, you are a winner"
test_file.write_text(test_text)
read_text = test_file.read_text()
print(read_text)
print("output of `df -h`")
print(os.system("df -h"))
self.next(self.end)
@step
def end(self):
pass
if __name__ == "__main__":
Flow()fast-honey-9693
06/01/2023, 5:48 PMCONDA_CHANNELS=pytorch,nvidia doesn't seem to have an effectfast-honey-9693
06/01/2023, 9:01 PM_create was passing the ::-style channel::package requirements directly to the conda CLI. can replicate the bug with
CONDA_SUBDIR=linux-64 conda install pytorch::pytorch==1.13.1 pytorch::torchvision==0.14.1 nvidia::pytorch-cuda=11.7fast-honey-9693
06/01/2023, 9:23 PMCONDA_SUBDIR=linux-64 mamba install pytorch::pytorch==1.13.1 pytorch::torchvision==0.14.1 nvidia::pytorch-cuda=11.7
i changed my metaflow config to use mamba as well and that seemed to fix the issue.
i guess this is a bug with conda? i guess i should file an issue on their github? kinda wildfast-honey-9693
06/02/2023, 12:24 AMfast-honey-9693
06/02/2023, 4:23 PM-c CHANNEL_NAME syntax—i could submit a PR to extract the channels and reformat the commandsquare-wire-39606
06/02/2023, 7:46 PMfast-honey-9693
06/02/2023, 11:49 PMconda --version
CONDA_SUBDIR=linux-64 conda install pytorch::pytorch==1.13.1 pytorch::torchvision==0.14.1 nvidia::pytorch-cuda==11.7
conda 23.5.0
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- nvidia::pytorch-cuda==11.7
Current channels:
- <https://conda.anaconda.org/pytorch/linux-64>
- <https://conda.anaconda.org/pytorch/noarch>
- <https://conda.anaconda.org/conda-forge/linux-64>
- <https://conda.anaconda.org/conda-forge/noarch>
- <https://repo.anaconda.com/pkgs/main/linux-64>
- <https://repo.anaconda.com/pkgs/main/noarch>
- <https://repo.anaconda.com/pkgs/r/linux-64>
- <https://repo.anaconda.com/pkgs/r/noarch>
To search for alternate channels that may provide the conda package you're
looking for, navigate to
<https://anaconda.org>
and use the search bar at the top of the page.fast-honey-9693
06/03/2023, 12:13 AMnvidia:: and adding -c nvidia hangs:
conda --version
CONDA_SUBDIR=linux-64 conda install pytorch::pytorch==1.13.1 pytorch::torchvision==0.14.1 pytorch-cuda==11.7 -c nvidia
conda 23.5.0
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: | - / \ | / %curved-island-17262
06/13/2023, 6:53 AM