kumarkrishna / fastssl

Fast SSL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing ffcv environment

arnaghosh opened this issue · comments

Installing a working environment with ffcv (FFCV-SSL) has been painful, due to changing version of dependencies etc. So, keeping track of the instructions that worked.

echo "Creating new conda environment ======"
conda create --prefix $SCRATCH/conda_envs/ffcv_ssl_fastssl -y python=3.9 conda conda-libmamba-solver -c conda-forge
conda activate $SCRATCH/conda_envs/ffcv_ssl_fastssl

echo "Setting up conda env variables and config options =========="
export CONDA_EXE="$(hash -r; which conda)"
conda config --set solver libmamba
conda config --set channel_priority flexible

echo "Installing torch and other important packages+dependencies ============"
conda install -y cupy pkg-config compilers libjpeg-turbo opencv=4.7.0 pytorch=2.1.2 torchvision=0.16.2 pytorch-cuda=12.1 torchmetrics numba=0.56.2 terminaltables matplotlib scikit-learn pandas assertpy pytz -c pytorch -c nvidia -c conda-forge

cd <FFCV-SSL folder>
pip install -e .
pip install wandb tqdm

Notes: Not sure if we need numba=0.56.2 but it was required to install original ffcv library