|
|
|
|
|
FROM rocker/r-ver:4.4.0 |
|
ENV RENV_CONFIG_REPOS_OVERRIDE https://packagemanager.rstudio.com/cran/latest |
|
|
|
|
|
|
|
RUN useradd --create-home appuser |
|
|
|
ENV HOME=/home/appuser |
|
WORKDIR $HOME |
|
|
|
|
|
RUN mkdir -p /home/appuser/.cache && chown -R appuser:appuser /home/appuser/.cache |
|
|
|
RUN mkdir -p /home/appuser/.cache/pins/url && chown -R appuser:appuser /home/appuser/.cache/pins/url |
|
|
|
COPY /PasienCHD/ /opt/ml/PasienCHD/ |
|
|
|
RUN apt-get update -qq && apt-get install -y --no-install-recommends \ |
|
libcurl4-openssl-dev \ |
|
libicu-dev \ |
|
libsodium-dev \ |
|
libssl-dev \ |
|
make \ |
|
zlib1g-dev \ |
|
&& apt-get clean |
|
|
|
COPY vetiver_renv.lock renv.lock |
|
RUN Rscript -e "install.packages('renv')" |
|
RUN Rscript -e "renv::restore()" |
|
COPY plumber.R /opt/ml/plumber.R |
|
EXPOSE 7860 |
|
ENTRYPOINT ["R", "-e", "pr <- plumber::plumb('/opt/ml/plumber.R'); pr$run(host = '0.0.0.0', port = 7860)"] |
|
|