0

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

Emm
  • 2,367
  • 3
  • 24
  • 50
  • The `run.R` file is not in the root directory - [*"if it has an `init.R` or `run.R` file **in the root directory**"*](https://github.com/virtualstaticvoid/heroku-buildpack-r/tree/heroku-16) (emphasis mine). – jonrsharpe Feb 04 '20 at 07:47
  • @jonrsharpe thanks, worked. but now getting the error bash: gunicorn: command not found – Emm Feb 04 '20 at 08:26
  • Perhaps: https://stackoverflow.com/questions/33021874/heroku-gunicorn-not-working-bash-gunicorn-command-not-found – IRTFM Feb 04 '20 at 18:59

0 Answers0