Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -3,12 +3,6 @@
3
  FROM rocker/r-ver:4.4.0
4
  ENV RENV_CONFIG_REPOS_OVERRIDE https://packagemanager.rstudio.com/cran/latest
5
 
6
- # create a non-root user to run the app
7
- RUN useradd --create-home appuser
8
-
9
- ENV HOME=/home/appuser
10
- WORKDIR $HOME
11
-
12
  RUN apt-get update -qq && apt-get install -y --no-install-recommends \
13
  libcurl4-openssl-dev \
14
  libicu-dev \
@@ -18,13 +12,20 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
18
  zlib1g-dev \
19
  && apt-get clean
20
 
 
 
 
 
 
 
 
21
  # Create the .cache directory and give appuser permission to write to it
22
  RUN mkdir -p /home/appuser/.cache && chown -R appuser:appuser /home/appuser/.cache
23
  # Create the .cache/pins/url directory and give appuser permission to write to it
24
  RUN mkdir -p /home/appuser/.cache/pins/url && chown -R appuser:appuser /home/appuser/.cache/pins/url
25
 
26
  COPY /telco/ /opt/ml/telco/
27
- COPY vetiver_renv.lock renv.lock
28
  RUN Rscript -e "install.packages('renv')"
29
  RUN Rscript -e "renv::restore()"
30
  COPY plumber.R /opt/ml/plumber.R
 
3
  FROM rocker/r-ver:4.4.0
4
  ENV RENV_CONFIG_REPOS_OVERRIDE https://packagemanager.rstudio.com/cran/latest
5
 
 
 
 
 
 
 
6
  RUN apt-get update -qq && apt-get install -y --no-install-recommends \
7
  libcurl4-openssl-dev \
8
  libicu-dev \
 
12
  zlib1g-dev \
13
  && apt-get clean
14
 
15
+ COPY vetiver_renv.lock renv.lock
16
+
17
+ # create a non-root user to run the app
18
+ RUN useradd --create-home appuser
19
+
20
+ ENV HOME=/home/appuser
21
+ WORKDIR $HOME
22
  # Create the .cache directory and give appuser permission to write to it
23
  RUN mkdir -p /home/appuser/.cache && chown -R appuser:appuser /home/appuser/.cache
24
  # Create the .cache/pins/url directory and give appuser permission to write to it
25
  RUN mkdir -p /home/appuser/.cache/pins/url && chown -R appuser:appuser /home/appuser/.cache/pins/url
26
 
27
  COPY /telco/ /opt/ml/telco/
28
+
29
  RUN Rscript -e "install.packages('renv')"
30
  RUN Rscript -e "renv::restore()"
31
  COPY plumber.R /opt/ml/plumber.R