-
Notifications
You must be signed in to change notification settings - Fork 18
/
container-requirements-initializer.sh
executable file
·62 lines (41 loc) · 1.8 KB
/
container-requirements-initializer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Exit with an error if any command fails
set -e
apt-get update
apt-get install -y curl wget
# git required for the pke keyphrase extraction library (git pip link)
apt-get install -y git
pip install --no-cache-dir -r requirements.txt
# libgl required for CAD module
apt-get install -y libgl1
# required for textract (PDF text extraction) (but removed pstotext because it is no longer available!)
apt-get install -y python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig
# gcc required for tsfresh (timeseries feature extractor)
# tsfresh installation only works with the dependency (unlike the ones for other packages)
apt-get install -y gcc
pip install tsfresh
# Influx cli for remote backup / restore
wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.4.0-amd64.deb
apt install ./influxdb2-client-2.4.0-amd64.deb
rm influxdb2-client-2.4.0-amd64.deb
# Inter-process communication
apt-get install -y memcached
apt-get clean
# Requirements for the pke keyphrase extraction library
python -m spacy download en_core_web_sm
# OpenMMLab (must be after the pip requirements for mim)
# RUN mim install mmcv-full
pip install torch==1.12.1+cpu torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.12.0/index.html
# RUN pip install mmdet
cd dependencies
git clone --depth=1 https://github.com/open-mmlab/mmdetection.git --branch v2.26.0
cd mmdetection
pip install -v -e .
# Install the model:
mkdir checkpoints
cd checkpoints
mkdir faster_rcnn
cd faster_rcnn
wget https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
cd ../../..