Name build environment so it can be shared
Remove old scripts Update app name
This commit is contained in:
Родитель
6721422620
Коммит
279c6a6108
|
@ -1,3 +1,3 @@
|
|||
[global]
|
||||
index-url = https://packages.idmod.org/api/pypi/idm-pypi-production/simple
|
||||
index-url = https://packages.idmod.org/api/pypi/pypi-production/simple
|
||||
trusted-host = packages.idmod.org
|
|
@ -1,58 +0,0 @@
|
|||
# This script is meant to be ran before the model. it manages out dependencies for
|
||||
# our flu model R scripts
|
||||
|
||||
# load packages that are available in CRAN
|
||||
cranPkgLoad <- function( packages = "favourites" ) {
|
||||
|
||||
if( length( packages ) == 1L && packages == "favourites" ) {
|
||||
packages <- c(
|
||||
"optparse"
|
||||
)
|
||||
}
|
||||
|
||||
# we should probably change this to devtools::install_version and parse a requirement.txt file
|
||||
# this will make it easier to maintain our R packages in both docker and dev environments
|
||||
packagecheck <- match( packages, utils::installed.packages()[,1] )
|
||||
|
||||
packagestoinstall <- packages[ is.na( packagecheck ) ]
|
||||
|
||||
if( length( packagestoinstall ) > 0L ) {
|
||||
utils::install.packages( packagestoinstall, repos = "http://cran.csiro.au" )
|
||||
} else {
|
||||
print( "All cran requested packages already installed" )
|
||||
}
|
||||
|
||||
for( package in packages ) {
|
||||
suppressPackageStartupMessages(
|
||||
library( package, character.only = TRUE, quietly = TRUE )
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Later, replace this with reading the packages from a file so we can control them
|
||||
# similar to python's setup.py or requirement.txt
|
||||
|
||||
|
||||
cranPkgLoad(
|
||||
c(
|
||||
"optparse",
|
||||
"jsonlite",
|
||||
"magrittr",
|
||||
"dplyr",
|
||||
"tidyr"
|
||||
)
|
||||
)
|
||||
|
||||
# install all avaiable models
|
||||
setwd("./models")
|
||||
pkgs <- list.files(path='./')
|
||||
print(pkgs)
|
||||
sapply(pkgs, function(x) {
|
||||
paste("file://", x, sep="")
|
||||
})
|
||||
print(pkgs)
|
||||
install.packages(c(print(as.character(pkgs), collapse="\",\"")), dependencies=TRUE)
|
|
@ -1,5 +1,5 @@
|
|||
[uwsgi]
|
||||
module = seattle_flu.app:application
|
||||
module = seattle_flu_incidence_mapper.app:application
|
||||
master = true
|
||||
# Set the processes to total CPU count
|
||||
processes = %k
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
[uwsgi]
|
||||
module = seattle_flu_incidence_mapper.server:app
|
||||
master = true
|
||||
# Set the processes to total CPU count
|
||||
processes = %k
|
||||
threads = 1
|
||||
chdir = /app
|
||||
socket = service.sock
|
||||
chmod-socket = 666
|
||||
vacuum = true
|
||||
die-on-term = true
|
||||
reload-on-rss = 2048
|
||||
buffer-size = 32768
|
|
@ -37,7 +37,7 @@ services:
|
|||
# - "HTTP_PROXY=${HTTP_PROXY:-}"
|
||||
# - "HTTPS_PROXY=${HTTPS_PROXY:-}"
|
||||
# - "FTP_PROXY=${FTP_PROXY:-}"
|
||||
image: seattleflu_rmodeldev
|
||||
image: idm-docker-staging.packages.idmod.org/sfim_build_env:latest
|
||||
environment:
|
||||
- "DISABLE_AUTH=true"
|
||||
- "USERID=${UID:-1000}"
|
||||
|
|
Загрузка…
Ссылка в новой задаче