[英]Deploying a shiny app on Google Cloud App Engine returns an Error
我正在嘗試在Google Cloud App Engine靈活環境中部署一個閃亮的應用程序(沒有閃亮的服務器)。 所以我將我閃亮的應用程序停靠在我的計算機上。
這是app.yaml:
runtime: custom
env: flex
這是我的docker文件:
# start with the official R project base image
FROM r-base:latest
# copy this github repo into the Docker image and set as the working directory
COPY . /usr/local/src/myscripts
WORKDIR /usr/local/src/myscripts
# Install the C/C++ libraries needed to run the script
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev
# Install the R libraries needed to run the scripts
RUN /usr/bin/R --vanilla -f install_libraries.R
EXPOSE 8080
# Execute the target script
CMD ["Rscript", "run.R"]
這是我的Rcode啟動我的閃亮應用程序:run.R
library(shiny)
runApp(port = 8080, host = "0.0.0.0",launch.browser = FALSE)
所有部署進展順利,但是當我轉到我的應用引擎-https://.appspot.com/時 - 我在控制台中出現此錯誤。 應用程序看起來很灰。
有沒有辦法將我的閃亮應用程序放在應用程序引擎而不是計算引擎上?
Shiny基於App Engine目前不支持的WebSockets。 但是,它們在Flexible環境中現在支持( 鏈接 )開箱即用。 這使得Shiny App非常容易在App引擎上進行部署。 從本質上講,您的代碼現在應該正常工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.