I will leave the method when I installed Pythia, a framework of multimodal deep learning model published by Facebook AI Research. It may not be appropriate because it is a flow that I got caught in various ways and asked a friend and as a result I was able to move it.
Introduce how to install Pythia which is Framework of Multimodal AI models from Facebook AI Research.
First, build the following Dockerfile to create a container.
First, creating Docker contena using following Dockerfile.
https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/docker/Dockerfile
In that container, install it by referring to the Coloab demo code in Quickstart of Pythia's Documentation.
Let's install Pythia according to the Documentation. Follow the code of Quickstart Colab file.
Installation
Execute the following code in order on the terminal.
Run following codes on terminal.
cd
mkdir content
# Install dependencies
pip install ninja yacs cython matplotlib demjson
pip install git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
cd ~/content/
rm -rf fastText
git clone https://github.com/facebookresearch/fastText.git fastText
cd /content/fastText
pip install -e .
cd ~/content/
rm -rf pythia
git clone https://github.com/facebookresearch/pythia.git pythia
cd /content/pythia
# Don't modify torch version
sed -i '/torch/d' requirements.txt
pip install -e .
Add the following to .bashrc
Add the next PATH to bashrc.
PATH="$PATH":~/content/pythia
# Install maskrcnn-benchmark to extract detectron features
cd /content
git clone https://gitlab.com/meetshah1995/vqa-maskrcnn-benchmark.git
cd /content/vqa-maskrcnn-benchmark
# Compile custom layers and build mask-rcnn backbone
python setup.py build
python setup.py develop
Add the following to .bashrc Add the next PATH to bashrc.
PATH="$PATH":~/content/vqa-maskrcnn-benchmark
Also, I do the following with pythia dir with insurance
python setup.py develop
When I do this, I get the following error If run the above code, following error may return.
error: tqdm 4.19.9 is installed but tqdm>=4.27 is required by {'transformers'}
However, Pythia seems to be installed, so I manually insert transformers. Transformers lib requires tqdm>=4.27 , so you should update tqdm and install transformers manually using pip.
pip install -U tqdm
pip install transformers
You can now use transformers. Then you can use (it means import) transformers.
Installation is now complete. After that, I will leave the appearance of using it. Instllation of Pythia is finished. From now on, I'll record how I used it.
Recommended Posts