Spaces:
Runtime error
Runtime error
fix entrypoint
Browse files- Dockerfile +2 -1
- app/dga-classifier-service.R +1 -1
- app/launchservice.R +0 -2
Dockerfile
CHANGED
|
@@ -14,5 +14,6 @@ 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 |
-
|
|
|
|
| 18 |
|
|
|
|
| 14 |
RUN R -e "library(keras);install_keras(version='2.9')"
|
| 15 |
COPY /app /app
|
| 16 |
WORKDIR /app
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
ENTRYPOINT ["Rscript","/app/launchservice.R"]
|
| 19 |
|
app/dga-classifier-service.R
CHANGED
|
@@ -6,7 +6,7 @@ library(reticulate)
|
|
| 6 |
#model<-load_model_hdf5("/home/harpo/Dropbox/ongoing-work/git-repos/dga-wb-r/docker/app/pmodel.h5")
|
| 7 |
#model<-load_model_hdf5("/app/asai-2019_model.h5")
|
| 8 |
|
| 9 |
-
hfhub
|
| 10 |
tf <- reticulate::import("tensorflow")
|
| 11 |
model <- hfhub$from_pretrained_keras("harpomaxx/dga-detector")
|
| 12 |
|
|
|
|
| 6 |
#model<-load_model_hdf5("/home/harpo/Dropbox/ongoing-work/git-repos/dga-wb-r/docker/app/pmodel.h5")
|
| 7 |
#model<-load_model_hdf5("/app/asai-2019_model.h5")
|
| 8 |
|
| 9 |
+
hfhub <- reticulate::import('huggingface_hub')
|
| 10 |
tf <- reticulate::import("tensorflow")
|
| 11 |
model <- hfhub$from_pretrained_keras("harpomaxx/dga-detector")
|
| 12 |
|
app/launchservice.R
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
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=7860)
|
|
|
|
| 1 |
library(plumber)
|
| 2 |
r <- plumb("/app/dga-classifier-service.R")
|
|
|
|
|
|
|
| 3 |
r$run(host = "0.0.0.0",port=7860)
|