我有一个R管道工服务器,我想使用docker容器运行它,到目前为止,我的dockerfile中已经有了这个配置 FROM rocker/r-ver:3.5.0
#update OS and install linux libraries needed to run plumber
RUN apt-get update -qq && apt-get install -y \
libssl-dev \
libcurl4-gnutls-dev
#load in dependencies from 00_Libraries.R file
RUN R -e
我想在码头集装箱上运行水管工API。
我尝试了以下两个dockerfile:
第一个Dockerfile
FROM rstudio/plumber
MAINTAINER Docker User <docker@user.org>
RUN R -e "install.packages('broom')"
RUN mkdir -p ~/application
# copy everything from the current directory into the container
COPY "/" "application/
我有一些R水管工文件工作使用RStudio,下一步是通过码头。
指令
source('R/to_run_api_shirin_docker.R')
Starting server to listen on port 8000
不要工作,并运行以下命令:
$ docker run -p 8000:8000 plumber_demo:v4
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computi
我在云运行中运行了google,我希望在同一个项目中访问plumbeR存储桶中的文件。API运行良好,但我无法通过身份验证。我试图使用googleAuthR和漱口库,但我做错了一些事情。
这是我的api.R
#* @get /
function(){
text <- "Hello, this is from a cloud run function...."
return ( text )
}
#* @get /haveToken
function(){
require(googleAuthR)
require(googleCloudStorageR)
在做什么?
我试图在上部署一个带有docker容器的R模型。我的最终目标是以API的形式提供模型。我是错误的部署应用程序使用水管工和码头集装箱。
R代码与水管工运行良好,在我的本地计算机使用RStudio。但现在我正在使用AI平台jupyter笔记本与R。我在本地测试码头使用码头运行图像名命令,我得到下面的消息,一旦码头运行。
Starting server to listen on port 8080
当我在本地Rstudio中运行R+水管工代码时,我会收到以下消息
Starting server to listen on port 8080
Running the swagger UI
我尝试在R.first中使用plumber包创建一个REST web API,它运行得很好,但是当我们第二次运行相同的代码时,它显示了"node stack overflow“错误。我只是尝试从我的函数中打印相同的消息。代码将在下一节中给出。
我也尝试过在VMWare linux (Ubuntu)上运行它,给它分配了额外的内存(最初是8192kb,然后是7969177 kb )。然而,结果始终是相同的错误
# plumber.R
#' Echo the parameter that was sent in
#' @param msg The me
这个问题的第一个版本可能没有我想要的那么清楚,因为它有很多部分,问题就在这个过程的一个部分。
尽我所能:我有一个由水管工进行http访问的托管R应用程序,我想让它在aws lambda中使用。
Dockerfile非常简单:
FROM rstudio/plumber:latest
WORKDIR /opt/ml
# system libraries of general use
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
我正在使用plumber编写一个R包。主要代码:
#' @title startServer
#' @description Start the api server on port `port`
#'
#' @param port Port number
#' @return none
#' @examples
#' startServer(8000)
#' @export
startServer <- function(port) {
port <- if (port == "")
po
我正在使用R、plumber和Docker编写生产级代码来创建一个API。我的API的输入是一个JSON文件,输出也是JSON格式。当我的输入文件超过一定的空间/内存限制时,我会遇到问题。我该如何处理这些问题呢? 这是我得到的错误: <simpleError in do.call(fi$exec, req$args): variable names are limited to 10000 bytes> 有什么方法可以避免这个错误?我如何以块的形式输入,以便修复空间限制?另外,为什么它要将其存储为变量名? 如果输入JSON文件的大小足够小,则api的输入可以正常工作。(大约46K
我使用下面的代码创建了一个虚拟模型: #get the data
data(Boston, package="MASS")
# train a model for median house price as a function of the other variables
bos_rf <- lm(medv ~ crim + indus + dis , data=Boston)
# save the model
saveRDS(bos_rf, "bos_rf.rds") 现在我想使用plumber将这个模型公开为一个API。为此,我的代码是 # l
我有asp核心api项目,我正在使用visual studio 2017来运行我的项目。在命令行上使用此命令重命名以前使用visual studio创建的docker容器后,
docker rename CONTAINER NEW_NAME
当我尝试在visual studio中再次运行该项目时,收到以下消息。
谢谢你的帮助
Can not find docker container with the name starting with 'previous_container_name'.
我想经营码头写作。在运行react和django应用程序期间,docker返回以下错误:
(base) dominik@Precision:~/PycharmProjects/humanet-docker$ ls
api docker-compose.prod.yml docker-compose.yml front nginx
(base) dominik@Precision:~/PycharmProjects/humanet-docker$ docker-compose ps
Name Comman