env.md
March 13, 2023 ยท View on GitHub
Setting up a development environment
If you do not have conda installed, you can install it from here. This code has been tested on Linux.
Create a new conda environment with Python 3.8.8:
conda create -n testoftime python=3.8.8 -y
Install the required packages:
- Activate the environment:
conda activate testoftime
- Install PyTorch 1.12.1 with CUDA 11.1 support:
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
Depending on your CUDA version, you may have to install this differently. See here for more details.
Note: Before proceeding, make sure to add $PWD to the PYTHONPATH environment variable:
export PYTHONPATH=$PWD:$PYTHONPATH
-
Setup code for
VideoCLIPmodel: We borrow code for VideoCLIP model from the official repository. In this repo, we provide an adaptation of their code inexternal/fairseq/examples/MMPT. The credit for the original code solely lies with the authors of the original repository at FAIR.2.1: Download best VideoCLIP checkpoint:
ckpt_dir=external/requirements/fairseq/runs/retri/videoclip mkdir -p $ckpt_dir wget https://dl.fbaipublicfiles.com/MMPT/retri/videoclip/checkpoint_best.pt -O $ckpt_dir/checkpoint_best.pt2.2: Check that loading the model works:
python external/utils_videoclip.py -
Install the rest of the required packages (in this order):
pip install ipdb
pip install transformers==3.4
pip install protobuf==3.20.0
pip install omegaconf==2.0.6
pip install termcolor==2.2.0
pip install pytorch_lightning==1.7.6
pip install wandb==0.13.3
pip install editdistance==0.6.2
pip install pandas==1.5.3
- Check that the installation was successful:
python setup/check_packages.py