Spaces:
Sleeping
Sleeping
add app file
Browse files- Dockerfile +18 -0
- app/Dockerfile +0 -9
- app/launchservice.R +1 -1
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM rstudio/plumber
|
2 |
+
MAINTAINER Carlos Catania (AKA Harpo) "[email protected]"
|
3 |
+
RUN apt update -y; apt install -y python3-venv python3-dev python3-pip
|
4 |
+
#RUN pip3 install huggingface_hub
|
5 |
+
RUN R -e "install.packages('reticulate');library('reticulate');reticulate::py_install('huggingface_hub')"
|
6 |
+
RUN R -e "install.packages('tensorflow')"
|
7 |
+
RUN R -e "install.packages('keras')"
|
8 |
+
RUN R -e "install.packages('purrr')"
|
9 |
+
RUN R -e "install.packages('tokenizers')"
|
10 |
+
RUN R -e "install.packages('dplyr')"
|
11 |
+
RUN R -e "install.packages('stringr')"
|
12 |
+
RUN R -e "install.packages('doMC')"
|
13 |
+
RUN R -e "library(tensorflow);install_tensorflow(version='2.9')"
|
14 |
+
RUN R -e "library(keras);install_keras(version='2.9')"
|
15 |
+
COPY /app /app
|
16 |
+
WORKDIR /app
|
17 |
+
CMD ["/app/launchservice.R"]
|
18 |
+
|
app/Dockerfile
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
FROM trestletech/plumber
|
2 |
-
MAINTAINER Carlos Catania (AKA Harpo) "[email protected]"
|
3 |
-
RUN apt install -y python-pip virtualenv
|
4 |
-
RUN R -e "install.packages('keras')"
|
5 |
-
RUN R -e "library(keras);install_keras()"
|
6 |
-
COPY . /app
|
7 |
-
WORKDIR /app
|
8 |
-
CMD ["/app/launchservice.R"]
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/launchservice.R
CHANGED
@@ -2,4 +2,4 @@ library(plumber)
|
|
2 |
r <- plumb("/app/dga-classifier-service.R")
|
3 |
#r <- plumb("/home/harpo/Dropbox/ongoing-work/git-repos/dga-wb-r/docker/app/dga-classifier-service.R")
|
4 |
|
5 |
-
r$run(host = "0.0.0.0",port=
|
|
|
2 |
r <- plumb("/app/dga-classifier-service.R")
|
3 |
#r <- plumb("/home/harpo/Dropbox/ongoing-work/git-repos/dga-wb-r/docker/app/dga-classifier-service.R")
|
4 |
|
5 |
+
r$run(host = "0.0.0.0",port=7860)
|