Skip to content

Commit 2dc9e72

Browse files
Fix icevision installation in Colab (airctic#887)
* google-colab package needs requests==2.23 * fix error in colab installation by selecting versions * remove ! and use -U everywhere * fixed version numbers * restart runtime after installation
1 parent 3fac2e6 commit 2dc9e72

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

install_colab.sh

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
echo "Installing icevision + dependencices for CUDA 10"
2+
echo "Uninstalling some dependencies to prevent errors"
3+
pip uninstall torchvision -y
4+
pip uninstall fastai -y
5+
6+
echo "Installing some dependencies to prevent errors"
7+
pip install PyYAML>=5.1 -U -q
8+
pip install datascience -U -q
9+
pip install tensorflow==2.4.0 -U -q
10+
pip install google-colab -U -q
11+
12+
echo "- Installing torch and its dependencies"
213
echo "- Installing torch and its dependencies"
3-
pip install torchtext==0.9.0 --upgrade -q
4-
pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html --upgrade -q
14+
pip install torchtext==0.9.0 -U -q
15+
pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html -U -q
16+
517
echo "- Installing fastai"
6-
pip install fastai==2.3.1 --upgrade -q
18+
pip install fastai==2.3.1 -U -q
19+
720
echo "- Installing icevision from master"
8-
pip install git+git://github.com/airctic/icevision.git\#egg=icevision[all] --upgrade -q
21+
pip install git+git://github.com/airctic/icevision.git@fix-colab-install -U -q
922
echo "- Installing icedata from master"
10-
pip install git+git://github.com/airctic/icedata.git --upgrade -q
23+
pip install git+git://github.com/airctic/icedata.git -U -q
1124
echo "- Installing yolov5-icevision"
12-
pip install yolov5-icevision --upgrade -q
25+
pip install yolov5-icevision -U -q
1326
echo "- Installing mmcv"
14-
pip install mmcv-full==1.3.7 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html --upgrade -q
27+
pip install mmcv-full==1.3.7 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html -U -q
1528
echo "- Installing mmdet"
16-
pip install mmdet==2.13.0 --upgrade -q
17-
echo "icevision installation finished!"
29+
pip install mmdet==2.13.0 -U -q
30+
echo "icevision installation finished"
1831

1932
# restart notebook
2033
echo "Restarting runtime!"

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install_requires =
3333
albumentations >=0.4.6,<0.6
3434
matplotlib >=3.2.2,<4
3535
pycocotools>=2.0.2<3
36-
requests >=2.24.0<3
36+
requests >=2.23.0<3
3737
loguru >=0.5.3
3838
pillow > 8.0.0
3939
importlib-metadata>=1;python_version<"3.8"

0 commit comments

Comments
 (0)