Spaces:
Sleeping
Sleeping
Commit
·
07f01fb
1
Parent(s):
83e30f2
Corregida descarga de artefacto
Browse files- Dockerfile +7 -5
- entrypoint.sh +4 -0
- local_exec_docker.sh +4 -2
- 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 |
-
|
88 |
-
#
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
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 |
-
|
|
|
|
|
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"))
|