File tree 1 file changed +37
-3
lines changed
1 file changed +37
-3
lines changed Original file line number Diff line number Diff line change 12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
- WITH_GPU=${1:- ON}
15
+
16
+ ARGS=` getopt -a -o w:n:h:hs -l WITH_GPU:,docker_name:,http_proxy:,https_proxy: -- " $@ " `
17
+
18
+ eval set -- " ${ARGS} "
19
+ echo " parse start"
20
+
21
+ while true
22
+ do
23
+ case " $1 " in
24
+ -w|--WITH_GPU)
25
+ WITH_GPU=" $2 "
26
+ shift ;;
27
+ -n|--docker_name)
28
+ docker_name=" $2 "
29
+ shift ;;
30
+ -h|--http_proxy)
31
+ http_proxy=" $2 "
32
+ shift ;;
33
+ -hs|--https_proxy)
34
+ https_proxy=" $2 "
35
+ shift ;;
36
+ --)
37
+ shift
38
+ break ;;
39
+ esac
40
+ shift
41
+ done
42
+
43
+ if [ -z $WITH_GPU ]; then
44
+ WITH_GPU=" ON"
45
+ fi
46
+
47
+ if [ -z $docker_name ]; then
48
+ docker_name=" build_fd"
49
+ fi
16
50
17
51
if [ $WITH_GPU == " ON" ]; then
18
52
@@ -30,7 +64,7 @@ if [ ! -d "./TensorRT-8.4.1.5/" ]; then
30
64
rm -rf TensorRT-8.4.1.5.Linux.x86_64-gnu.cuda-11.6.cudnn8.4.tar.gz
31
65
fi
32
66
33
- nvidia-docker run -i --rm --name build_fd \
67
+ nvidia-docker run -i --rm --name ${docker_name} \
34
68
-v` pwd` /..:/workspace/fastdeploy \
35
69
-e " http_proxy=${http_proxy} " \
36
70
-e " https_proxy=${https_proxy} " \
68
102
69
103
echo " start build FD CPU library"
70
104
71
- docker run -i --rm --name build_fd \
105
+ docker run -i --rm --name ${docker_name} \
72
106
-v` pwd` /..:/workspace/fastdeploy \
73
107
-e " http_proxy=${http_proxy} " \
74
108
-e " https_proxy=${https_proxy} " \
You can’t perform that action at this time.
0 commit comments