I am trying to deploy my shiny web app on heroku using this build pack
http://github.com/virtualstaticvoid/heroku-buildpack-r.git#heroku-16
Here is the github repository with the shiny app:
https://github.com/EmmS21/SpringboardCapstoneBoxingPredictionWebApp
I have a run.R file: library(shiny)
port <- Sys.getenv('PORT')
shiny::runApp(
appDir = getwd(),
host = '0.0.0.0',
port = as.numeric(port)
)
and init.R to install all relevant libraries:
my_packages = c("shinyWidgets","tidyverse","reticulate","DT","data.table")
install_if_missing = function(p) {
if (p %in% rownames(installed.packages()) == FALSE) {
install.packages(p, dependencies = TRUE)
}
}
invisible(sapply(my_packages, install_if_missing))
and app.R
library(shiny)
library(shinyWidgets)
library(tidyverse)
library(reticulate)
library(DT)
library(data.table)
virtualenv_create(envname = "python_environment", python= "python3")
virtualenv_install("python_environment", packages =c('pandas','catboost'))
use_virtualenv("python_environment",required = TRUE)
...
all inside the file path mlmodel >> app/boxing
I tried deployed my app but getting the error message:
-----> App not compatible with buildpack: http://github.com/virtualstaticvoid/heroku-buildpack-r.git#heroku-16
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
ml model/appboxing