jrosell commited on
Commit
32259a7
·
1 Parent(s): b22fd61

install2.r

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -26
Dockerfile CHANGED
@@ -8,32 +8,39 @@ ENV RUSTUP_HOME=/usr/local/rustup \
8
  PATH=/usr/local/cargo/bin:$PATH
9
 
10
  RUN set -eux; \
11
- apt-get update; \
12
- apt-get install -y --no-install-recommends \
13
- ca-certificates \
14
- gcc \
15
- libc6-dev \
16
- wget \
17
- ; \
18
- \
19
- url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; \
20
- wget "$url"; \
21
- chmod +x rustup-init; \
22
- ./rustup-init -y --no-modify-path --default-toolchain beta --default-host x86_64-unknown-linux-gnu; \
23
- rm rustup-init; \
24
- chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
25
- rustup --version; \
26
- cargo --version; \
27
- rustc --version; \
28
- \
29
- apt-get remove -y --auto-remove \
30
- wget \
31
- ; \
32
- rm -rf /var/lib/apt/lists/*;
33
-
34
- RUN R -e "options(bspm.sudo = TRUE); install.packages(c('htmltools', 'tidyverse', 'zeallot', 'rlang', 'glue', 'this.path', 'DBI', 'pool', 'RSQLite', 'remotes', 'promises', 'assertthat', 'log')); bspm::enable();"
 
 
35
 
36
- RUN R -e "options(bspm.sudo = TRUE); install.packages('b64', repos = c('https://extendr.r-universe.dev', 'https://cloud.r-project.org')); install.packages('uwu', repos = c('https://josiahparry.r-universe.dev', 'https://cloud.r-project.org')); bspm::enable(); "
 
 
 
 
 
37
 
38
  # RUN adduser newuser
39
  # COPY --chown=newuser . .
@@ -42,4 +49,4 @@ COPY . .
42
  RUN chmod -R 755 /workspace
43
 
44
  EXPOSE 7860
45
- CMD R -e "options(bspm.sudo = TRUE); print(nchar(Sys.getenv('GITHUB_PAT'))); remotes::install_github(c('devOpifex/ambiorix', 'devOpifex/scilis', 'devOpifex/signaculum')); remotes::install_github('jrosell/ambhtmx', force = TRUE); bspm::enable(); source('app.R'); "
 
8
  PATH=/usr/local/cargo/bin:$PATH
9
 
10
  RUN set -eux; \
11
+ apt-get update; \
12
+ apt-get install -y --no-install-recommends \
13
+ git \
14
+ sudo \
15
+ ca-certificates \
16
+ gcc \
17
+ libc6-dev \
18
+ wget \
19
+ && sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \
20
+ && sed -i -e '/^suppressMessages(bspm::enable())$/i options(bspm.sudo=TRUE)' /etc/R/Rprofile.site \
21
+ ; \
22
+ \
23
+ url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; \
24
+ wget "$url"; \
25
+ chmod +x rustup-init; \
26
+ ./rustup-init -y --no-modify-path --default-toolchain beta --default-host x86_64-unknown-linux-gnu; \
27
+ rm rustup-init; \
28
+ chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
29
+ rustup --version; \
30
+ cargo --version; \
31
+ rustc --version; \
32
+ \
33
+ apt-get remove -y --auto-remove \
34
+ wget \
35
+ ; \
36
+ rm -rf /var/lib/apt/lists/*;
37
 
38
+ RUN install2.r --error -s --deps TRUE \
39
+ htmltools tidyverse zeallot rlang glue this.path DBI pool RSQLite remotes promises assertthat log
40
+ RUN Rscript -e "install.packages('b64', repos = c('https://extendr.r-universe.dev', getOption('repos')))"
41
+ RUN Rscript -e "install.packages('uwu', repos = c('https://josiahparry.r-universe.dev', getOption('repos')))"
42
+ RUN installGithub.r \
43
+ devOpifex/ambiorix devOpifex/scilis devOpifex/signaculum jrosell/ambhtmx
44
 
45
  # RUN adduser newuser
46
  # COPY --chown=newuser . .
 
49
  RUN chmod -R 755 /workspace
50
 
51
  EXPOSE 7860
52
+ CMD R -e "print(nchar(Sys.getenv('GITHUB_PAT'))); source('app.R'); "