aaraya commited on
Commit
f6eaab3
·
1 Parent(s): f3338da

Update dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. install.sh +55 -0
Dockerfile CHANGED
@@ -4,6 +4,9 @@ ENV TORCH_HOME=/app/.torch_cache
4
  ENV XDG_CACHE_HOME=/app/.cache
5
  ENV HOME=/app
6
 
 
 
 
7
  USER root
8
  RUN mkdir -p /app/.cache && chown -R 1000:1000 /app/.cache
9
  USER 1000
 
4
  ENV XDG_CACHE_HOME=/app/.cache
5
  ENV HOME=/app
6
 
7
+ COPY install.sh .
8
+ RUN ./install.sh
9
+
10
  USER root
11
  RUN mkdir -p /app/.cache && chown -R 1000:1000 /app/.cache
12
  USER 1000
install.sh ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ function print_help() {
4
+ echo "Usage:
5
+
6
+ ./install.sh [option]
7
+
8
+ This script installs all dependencies required for syntetic artifact generator.
9
+ -h --help Print this help."
10
+ }
11
+
12
+ function install_scdepthpl() {
13
+
14
+ pip3 install torch==1.13.1 networkx==3.0 torchvision==0.14.1 --index-url https://download.pytorch.org/whl/cu117
15
+ pip3 install torchmetrics==0.11.4
16
+ pip3 install git+https://gitlab.ridgerun.com/open/sc_depth_pl
17
+
18
+ mkdir -p sc_depth_pl/ckpts/ddad_scv3
19
+ cd sc_depth_pl/ckpts/ddad_scv3
20
+ gdown "https://drive.google.com/u/0/uc?id=1sATBbnZSDQbu_36F6js5y9ZWb1fo_uIh&confirm=t"
21
+ unzip ddad_scv3.zip
22
+ cd -
23
+
24
+ absolute_path=$(readlink -f "./")
25
+ models_dict='{"models_path": "'$absolute_path'"}' && models_path=~/.local/rrdehazing && \
26
+ mkdir -p $models_path && echo $models_dict > $models_path/models_path.json
27
+ }
28
+
29
+
30
+ set -e # exit if error
31
+ opts=$(getopt -o h --longoptions help,git-token: -- "$@")
32
+ parent_dir=$PWD
33
+
34
+ while [[ $opts ]]; do
35
+ case "$1" in
36
+ -h|--help)
37
+ print_help
38
+ exit 0
39
+ ;;
40
+ --)
41
+ break
42
+ ;;
43
+ *)
44
+ if [ ! -z "$1" ]; then
45
+ echo "Invalid option: $1" >&2
46
+ exit 1
47
+ fi
48
+ break
49
+ ;;
50
+ esac
51
+ shift
52
+ done
53
+
54
+ echo "Installing model: sc depth pl"
55
+ install_scdepthpl