From bb902f5b654865edfb2432aac82412e58935eef8 Mon Sep 17 00:00:00 2001 From: Harshvardhan Chandirasekar Date: Sun, 25 Jul 2021 23:53:30 +0530 Subject: [PATCH] fix for downloading weights(utils.cpp) when using docker --- src/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index 71dcce6..510b778 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -23,7 +23,7 @@ bool fileExist(const char *fname) { void downloadWeightsifDoNotExist(const std::string& input_bin, const std::string& test_folder, const std::string& weights_url){ if(!fileExist(input_bin.c_str())){ std::string mkdir_cmd = "mkdir " + test_folder; - std::string wget_cmd = "curl " + weights_url + " --output " + test_folder + "/weights.zip"; + std::string wget_cmd = "curl -tlsv1 -C - " + weights_url + " --output " + test_folder + "/weights.zip --user user:pass -O --retry 999 --retry-max-time 0"; #ifdef __linux__ std::string unzip_cmd = "unzip " + test_folder + "/weights.zip -d" + test_folder; std::string rm_cmd = "rm " + test_folder + "/weights.zip";