developmentseed / slickformer

Segmenting oil slicks with a panoptic segmentation transformer architecture
4 stars 1 forks source link

Update to Pytorch 2.0 and TorchData .6 #8

Closed rbavery closed 1 year ago

rbavery commented 1 year ago

going from this

name: slickformer
channels:
    - conda-forge
    - pytorch
dependencies:
    - albumentations
    - black
    - boto3
    - cudatoolkit==11.7
    - dask
    - distributed
    - gcc
    - graphviz
    - httpx
    - hydra-core
    - ipykernel
    - jpeg
    - libpng
    - matplotlib
    - opencv
    - pandas
    - pip
    - python-graphviz
    - pytorch-lightning
    - pystac-client
    - rasterio
    - rioxarray
    - scikit-image
    - scikit-learn
    - scipy
    - seaborn
    - tensorboard
    - timm
    - pytorch
    - torchdata
    - torchvision
    - transformers
    - xbatcher
    - zen3geo
    - pip:
        - git+https://github.com/cocodataset/panopticapi.git@7bb4655548f98f3fedc07bf37e9040a992b054b0
        - git+https://github.com/waspinator/pycococreator.git@0.2.1
        - rio-cogeo
        - rio-tiler-pds

to pinned versions

name: slickformer
channels:
    - conda-forge
    - pytorch
dependencies:
    - albumentations
    - black
    - boto3
    - cudatoolkit==11.7
    - dask
    - distributed
    - gcc
    - graphviz
    - httpx
    - hydra-core
    - ipykernel
    - jpeg
    - libpng
    - matplotlib
    - opencv
    - pandas
    - pip
    - python-graphviz
    - pytorch-lightning==2.0
    - pystac-client
    - rasterio
    - rioxarray
    - scikit-image
    - scikit-learn
    - scipy
    - seaborn
    - tensorboard
    - timm
    - pytorch==2.0
    - torchdata==0.6
    - torchvision
    - transformers
    - xbatcher
    - zen3geo
    - pip:
        - git+https://github.com/cocodataset/panopticapi.git@7bb4655548f98f3fedc07bf37e9040a992b054b0
        - git+https://github.com/waspinator/pycococreator.git@0.2.1
        - rio-cogeo
        - rio-tiler-pds

solves but fails when importing torch, cuda not found. likely due to an outdated cuda issue?

rbavery commented 1 year ago

this doesn't seem like ti should be the case, the suggested install from pytorch website uses cuda 11.7

conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
rbavery commented 1 year ago

solved by adding pytorch-cuda instead of cuda-toolkit and nvidia channel

name: slickformer
channels:
    - conda-forge
    - pytorch
    - nvidia
dependencies:
    - albumentations
    - black
    - boto3
    - dask
    - distributed
    - gcc
    - graphviz
    - httpx
    - hydra-core
    - ipykernel
    - jpeg
    - libpng
    - matplotlib
    - opencv
    - pandas
    - pip
    - python-graphviz
    - pytorch==2.0
    - pytorch-lightning==2.0
    - pytorch-cuda==11.7
    - pystac-client
    - rasterio
    - rioxarray
    - scikit-image
    - scikit-learn
    - scipy
    - seaborn
    - tensorboard
    - timm
    - torchdata==0.6
    - torchvision
    - transformers
    - xbatcher
    - zen3geo
    - pip:
        - git+https://github.com/cocodataset/panopticapi.git@7bb4655548f98f3fedc07bf37e9040a992b054b0
        - git+https://github.com/waspinator/pycococreator.git@0.2.1
        - rio-cogeo
        - rio-tiler-pds