Skip to content

Commit

Permalink
#21. Refactoring download resources script issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Apr 18, 2022
1 parent 4f0d232 commit c36223c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docker/deeppavlov_data.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
#!/bin/bash

# This is required since DeepPavlov downloader might not work.

# Apache server demo dir.
demo_dir="/var/www/demo/"
dp_dir=$demo_dir.deeppavlov

# Assigning remote URLs.
ner_model_url="http://files.deeppavlov.ai/deeppavlov_data/ner_ontonotes_bert_mult_v1.tar.gz"
bert_model_url="http://files.deeppavlov.ai/deeppavlov_data/bert/multi_cased_L-12_H-768_A-12.zip"

# Donwload models.
wget $(ner_model_url)
wget $(bert_model_url)
wget $ner_model_url
wget $bert_model_url

# Unpacking models.
tar -xvf ner_ontonotes_bert_mult_v1.tar.gz
unzip multi_cased_L-12_H-768_A-12.zip
rm ner_ontonotes_bert_mult_v1
rm multi_cased_L-12_H-768_A-12
rm ner_ontonotes_bert_mult_v1.tar.gz
rm multi_cased_L-12_H-768_A-12.zip

# Prepare target folders.
mkdir -p "$(demo_dir).deeppavlov/models/"
mkdir -p "$(demo_dir).deeppavlov/downloads/bert_models/"
mkdir -p "$dp_dir/models/"
mkdir -p "$dp_dir/downloads/bert_models/"

# Moving models.
mv "ner_ontonotes_bert_mult_v1" "$(demo_dir).deeppavlov/models/"
mv "multi_cased_L-12_H-768_A-12" "$(demo_dir).deeppavlov/downloads/bert_models/"
mv "ner_ontonotes_bert_mult" "$dp_dir/models/"
mv "multi_cased_L-12_H-768_A-12" "$dp_dir/downloads/bert_models/"

0 comments on commit c36223c

Please sign in to comment.