misantamaria commited on
Commit
07f01fb
·
1 Parent(s): 83e30f2

Corregida descarga de artefacto

Browse files
Files changed (4) hide show
  1. Dockerfile +7 -5
  2. entrypoint.sh +4 -0
  3. local_exec_docker.sh +4 -2
  4. r_shiny_app/server.R +3 -1
Dockerfile CHANGED
@@ -84,8 +84,10 @@ RUN mkdir /home/.cache/matplotlib
84
  RUN chmod +777 /home/.cache/matplotlib
85
 
86
  RUN echo "RETICULATE_MINICONDA_PATH" $RETICULATE_MINICONDA_PATH
87
- #CMD [ "R", "-e", "shiny::runApp(host='0.0.0.0'", "port="${RSTUDIO_PORT}, "appDir = '/home/${USER_NAME}/app')" ]
88
- #CMD [ "R -e shiny::runApp(host='0.0.0.0', port=Sys.getenv('RSTUDIO_PORT'), appDir = Sys.getenv('APPDIR'))" ]
89
- #CMD R -e "shiny::runApp(host='0.0.0.0', port=as.numeric(Sys.getenv('RSTUDIO_PORT')), appDir = Sys.getenv('APPDIR'))"
90
- #CMD ["R", "--quiet", "-e", "shiny::runApp(Sys.getenv('APP'), host='0.0.0.0', port=7860)"]
91
- CMD ["R", "--quiet", "-e", "shiny::runApp(Sys.getenv('APP'), host='0.0.0.0', port=as.integer(Sys.getenv('RSTUDIO_PORT')))"]
 
 
 
84
  RUN chmod +777 /home/.cache/matplotlib
85
 
86
  RUN echo "RETICULATE_MINICONDA_PATH" $RETICULATE_MINICONDA_PATH
87
+
88
+ #Online
89
+ CMD ["R", "--quiet", "-e", "shiny::runApp(Sys.getenv('APP'), host='0.0.0.0', port=as.integer(Sys.getenv('RSTUDIO_PORT')))"]
90
+
91
+
92
+
93
+
entrypoint.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # start rstudio server
2
+ /init
3
+ exec "$@"
4
+
local_exec_docker.sh CHANGED
@@ -14,9 +14,11 @@ echo "args: ${args[@]}"
14
  INTER=$1
15
 
16
  flags=()
17
- if((INTER == 1)); then
18
  echo "INTERACTIVE"
19
- flags+=(-it --entrypoint /bin/bash)
 
 
20
  fi
21
 
22
  flags+=("--gpus" "all")
 
14
  INTER=$1
15
 
16
  flags=()
17
+ if ((INTER == 1)); then
18
  echo "INTERACTIVE"
19
+ flags+=("-it" "--entrypoint" "/bin/bash")
20
+ else
21
+ flags+=( "--entrypoint" "entrypoint.sh")
22
  fi
23
 
24
  flags+=("--gpus" "all")
r_shiny_app/server.R CHANGED
@@ -567,7 +567,9 @@ shinyServer(function(input, output, session) {
567
  path = file.path(DEFAULT_PATH_WANDB_ARTIFACTS, ts_ar$metadata$TS$hash)
568
  print(paste0("Reactive tsdf | Read feather ", path ))
569
  flush.console()
570
- path = ts_ar$download()[0]
 
 
571
  df <- read_feather(path, as_data_frame = TRUE, mmap = TRUE) %>% rename('timeindex' = `__index_level_0__`)
572
  t_end = Sys.time()
573
  print(paste0("Reactive tsdf | Read feather | Execution time: ", t_end - t_init, " seconds"))
 
567
  path = file.path(DEFAULT_PATH_WANDB_ARTIFACTS, ts_ar$metadata$TS$hash)
568
  print(paste0("Reactive tsdf | Read feather ", path ))
569
  flush.console()
570
+ artifact_dir = ts_ar$download(root=DEFAULT_PATH_WANDB_ARTIFACTS)
571
+ print(paste0("Reactive tsdf | Read feather | Path: ", path ))
572
+
573
  df <- read_feather(path, as_data_frame = TRUE, mmap = TRUE) %>% rename('timeindex' = `__index_level_0__`)
574
  t_end = Sys.time()
575
  print(paste0("Reactive tsdf | Read feather | Execution time: ", t_end - t_init, " seconds"))