misantamaria commited on
Commit
04c66c2
·
1 Parent(s): e3036b0

añadido print a los ls la

Browse files
Dockerfile CHANGED
@@ -59,5 +59,8 @@ RUN chmod +777 /home/.config/matplotlib
59
 
60
  RUN echo "RETICULATE_MINICONDA_PATH" $RETICULATE_MINICONDA_PATH
61
 
 
 
 
62
  #Online
63
  CMD ["R", "--quiet", "-e", "shiny::runApp(Sys.getenv('APP'), host='0.0.0.0', port=as.integer(Sys.getenv('RSTUDIO_PORT')))"]
 
59
 
60
  RUN echo "RETICULATE_MINICONDA_PATH" $RETICULATE_MINICONDA_PATH
61
 
62
+ COPY --chown=${USER_ID}:${GROUP_ID} ./entrypoint.sh ./entrypoint.sh
63
+ RUN chmod +x ./entrypoint.sh
64
+
65
  #Online
66
  CMD ["R", "--quiet", "-e", "shiny::runApp(Sys.getenv('APP'), host='0.0.0.0', port=as.integer(Sys.getenv('RSTUDIO_PORT')))"]
entrypoint.sh CHANGED
@@ -1,4 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # start rstudio server
2
  /init
3
- exec "$@"
4
-
 
1
+ #!/bin/bash --login
2
+ set -e
3
+
4
+ echo ". ${HOME}/miniconda3/etc/profile.d/conda.sh" >> ${HOME}/.bashrc
5
+ # Make bash automatically activate the conda environment
6
+ echo "conda activate ${ENV_PREFIX}" >> ~/.bashrc
7
+ #echo "export WANDB_ENTITY=${WANDB_ENTITY:-default}" >> ${HOME}/.bashrc
8
+ # echo "WANDB_ENTITY=${WANDB_ENTITY:-default}" >> ${HOME}/.Renviron
9
+
10
+ # Define an array of environment variable names from the ENV_VARS Compose variable
11
+ IFS=',' read -ra ENV_VAR_NAMES <<< "$ENV_VARS"
12
+
13
+ echo "ENV_VAR_NAMES=${ENV_VAR_NAMES[@]}"
14
+
15
+ # Loop through the array of environment variable names and set the variables
16
+ for ENV_VAR_NAME in "${ENV_VAR_NAMES[@]}"; do
17
+ ENV_VAR_VALUE="${!ENV_VAR_NAME:-default}"
18
+ echo "$ENV_VAR_NAME=$ENV_VAR_VALUE" >> ${HOME}/.Renviron
19
+ done
20
+
21
+ ulimit -s 16384
22
+
23
  # start rstudio server
24
  /init
25
+ exec "$@"
 
local_exec_docker.sh CHANGED
@@ -17,8 +17,8 @@ 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")
 
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/global.R CHANGED
@@ -155,11 +155,11 @@ make_individual_dygraph <- function(i){
155
  # RETRIEVE WANDB RUNS & ARTIFACTS #
156
  ###################################
157
 
158
- system('ls -la /home/app', intern=TRUE)
159
 
160
  api <- wandb$Api()
161
 
162
- system('ls -la /home/app', intern=TRUE)
163
 
164
  print("Querying encoders")
165
  encs_l <- dvats$get_wandb_artifacts(project_path = glue(WANDB_ENTITY, "/", WANDB_PROJECT),
 
155
  # RETRIEVE WANDB RUNS & ARTIFACTS #
156
  ###################################
157
 
158
+ print(system('ls -la /home/app', intern=TRUE))
159
 
160
  api <- wandb$Api()
161
 
162
+ print(system('ls -la /home/app', intern=TRUE))
163
 
164
  print("Querying encoders")
165
  encs_l <- dvats$get_wandb_artifacts(project_path = glue(WANDB_ENTITY, "/", WANDB_PROJECT),
r_shiny_app/server.R CHANGED
@@ -580,8 +580,8 @@ shinyServer(function(input, output, session) {
580
  flush.console()
581
  #artifact_dir = ts_ar$download(root=DEFAULT_PATH_WANDB_ARTIFACTS)
582
  #print(paste0("Reactive tsdf | Read feather | Downloaded: ", artifact_dir))
583
- system('ls -la /.artifacts', intern=TRUE)
584
- system('ls -la /.artifacts/mvp-SWV:v1', intern=TRUE)
585
  df <- read_feather(path, as_data_frame = TRUE, mmap = FALSE) %>% rename('timeindex' = `__index_level_0__`)
586
  t_end = Sys.time()
587
  print(paste0("Reactive tsdf | Read feather | Execution time: ", t_end - t_init, " seconds"))
 
580
  flush.console()
581
  #artifact_dir = ts_ar$download(root=DEFAULT_PATH_WANDB_ARTIFACTS)
582
  #print(paste0("Reactive tsdf | Read feather | Downloaded: ", artifact_dir))
583
+ print(system('ls -la /.artifacts', intern=TRUE))
584
+ print(system('ls -la /.artifacts/mvp-SWV:v1', intern=TRUE))
585
  df <- read_feather(path, as_data_frame = TRUE, mmap = FALSE) %>% rename('timeindex' = `__index_level_0__`)
586
  t_end = Sys.time()
587
  print(paste0("Reactive tsdf | Read feather | Execution time: ", t_end - t_init, " seconds"))