BMIRDS/deepslide

Pytorch CPU and conda environment conflicts

Closed this issue · 1 comments

Not a bug report per se, but I thought it would be useful to add this to the issues list in case other people have this problem.

When trying to set up the Conda environment I was having trouble installing a Cuda-compatible version of Pytorch. The CPU version was automatically installed when using the default conda_env.yaml file. Whenever I made changes to the .yaml file to try to install the GPU version the environment would take an extremely long time to solve and would contain conflicts. To get a working environment I was required to make the following changes to the conda_env.yaml file:

#$ conda env create --file conda-env.yaml
name: deepslide_env
channels:
  - pytorch
  - nvidia 
  - conda-forge
dependencies:
  - python=3.11
  - torchvision
  - pytorch-cuda=11.7
  - pytorch
  - pandas
  - matplotlib
  - scikit-learn
  - scikit-image
  - pip
  - pip:
    - -r pip-requirements.txt

One consequence of this was using a newer version of Pandas, meaning the following line of code needed changing:
utils_model.py (line 63): cm.style.hide_index() ---> cm.style.hide(axis = 'index')

Stale issue message