Installation
We strongly recommend using Conda as the environment manager when dealing with deep learning / data science / machine learning.
classy
requires Python 3.8 or later, and is built on PyTorch Lightning.
It's recommended that you install the PyTorch ecosystem before installing classy
by following the instructions on pytorch.org.
Or, simply put:
conda install pytorch cudatoolkit=CUDA_VERSION -c pytorch
Don't know what CUDA_VERSION
you have?
Check this link.
The preferred way to install classy
is via pip
. Just run pip install classy-core
.
Installing via pip
Setting up a virtual environment
Conda can be used set up a virtual environment with the
version of Python required for classy
. If you already have a Python 3
environment you want to use, you can skip to the
Installing the library and dependencies section.
Create a Conda environment with Python 3.8+:
conda create -n classy python=3.8
Activate the Conda environment:
conda activate classy
Installing the library and dependencies
Simply execute
pip install classy-core
and voilà! You're all set.
Looking for some adventures? Install nightly releases directly from pypi! You will not regret it :)
Installing from source
You can also install classy
by cloning this repository:
git clone https://github.com/sunglasses-ai/classy.git
cd classy
Follow the steps at setting up a virtual environment and then install classy
by
pip install -e .
This will make classy
available in your environment, but using the sources of the cloned repository.
Using classy via docker
Alternatively, we also release and mantain a Docker image with everything already set up. In order to use it locally, you need to install:
Once set up, you can just run docker run --gpus all -it poccio/classy bash
(or checkout poccio/classy
for specific version tags) and you'll get a shell on a fully-setup container, with a classy conda environment already
created.
Alternatively, if you use external cloud computing platforms that support docker images (e.g. vast.ai),
just providing the image name (poccio/classy
) should suffice (it's hosted on Dockerhub).