Skip to content

Commit

Permalink
Update conda install instructions (#918)
Browse files Browse the repository at this point in the history
Until now, the conda install instructions relied on the environment.yml
in this repo. However, this file was rarely if ever updated, so it's
actually not a good idea to use it. Furthermore, for the purpose of
developing on skorch, there is no good reason why exactly those versions
should be used, as they will likely differ from what is run on CI
anyway. Therefore, this PR removes the environment.yml and updates the
conda install instructions not to rely on it.

One further minor change is not to install cudatoolkit but instead
pytorch-cuda, which is what is recommended on pytorch.org.
  • Loading branch information
BenjaminBossan committed Nov 29, 2022
1 parent f3c244a commit 5a19171
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 145 deletions.
17 changes: 12 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ To install skorch from source using conda, proceed as follows:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda env create
conda activate skorch
conda create -n skorch-env python=3.10
conda activate skorch-env
conda install -c pytorch pytorch
python -m pip install -r requirements.txt
python -m pip install .
If you want to help developing, run:
Expand All @@ -192,13 +194,18 @@ If you want to help developing, run:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda env create
conda activate skorch
conda create -n skorch-env python=3.10
conda activate skorch-env
conda install -c pytorch pytorch
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
py.test # unit tests
pylint skorch # static code checks
You may adjust the Python version to any of the supported Python versions.

Using pip
---------

Expand Down Expand Up @@ -251,7 +258,7 @@ In general, running this to install PyTorch should work:
.. code:: bash
# using conda:
conda install pytorch cudatoolkit -c pytorch
conda install pytorch pytorch-cuda -c pytorch
# using pip
python -m pip install torch
Expand Down
21 changes: 14 additions & 7 deletions docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ If you just want to use skorch, use:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda env create
conda activate skorch
conda create -n skorch-env python=3.10
conda activate skorch-env
# install pytorch version for your system (see below)
python -m pip install -r requirements.txt
python -m pip install .
If you want to help developing, run:
Expand All @@ -45,13 +47,19 @@ If you want to help developing, run:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda env create
conda activate skorch
conda create -n skorch-env python==3.10
conda activate skorch-env
# install pytorch version for your system (see below)
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
py.test # unit tests
pylint skorch # static code checks
You may adjust the Python version to any of the supported Python versions, i.e.
Python 3.7 or higher.

Using pip
^^^^^^^^^

Expand Down Expand Up @@ -99,12 +107,11 @@ However, that doesn't mean that older versions don't work, just that
they aren't tested. Since skorch mostly relies on the stable part of
the PyTorch API, older PyTorch versions should work fine.

In general, running this to install PyTorch should work (assuming CUDA
11.1):
In general, running this to install PyTorch should work:

.. code:: bash
# using conda:
conda install pytorch cudatoolkit==11.1 -c pytorch
conda install pytorch pytorch-cuda -c pytorch
# using pip
python -m pip install torch
133 changes: 0 additions & 133 deletions environment.yml

This file was deleted.

0 comments on commit 5a19171

Please sign in to comment.