-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (40 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM rocker/r-ver:latest as renv_base
WORKDIR /usr/local/src/myscripts
RUN apt-get update && \
apt-get install -yyy \
build-essential \
libcurl4-gnutls-dev \
libxml2-dev \
libssl-dev \
libgmp3-dev \
cmake \
libcairo2-dev \
libxt-dev \
libharfbuzz-dev \
libtiff-dev \
libzstd-dev
# Wait until MRCIEU R-Universe has built latest version of the TwoSampleMR binary
# Should be 1 hour or maybe overnight
# Check https://mrcieu.r-universe.dev/TwoSampleMR
# I set the HTTPUserAgent option in order to obtain binary packages from the
# Public Posit Package Manager (otherwise source packages which will have to
# be built will be obtained).
WORKDIR /project
COPY renv.lock renv.lock
RUN mkdir -p renv
COPY .Rprofile .Rprofile
COPY renv/activate.R renv/activate.R
COPY renv/settings.json renv/settings.json
RUN R -e 'options( \
repos = c(universe = "https://mrcieu.r-universe.dev/bin/linux/jammy/4.3/", \
CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"), \
HTTPUserAgent = sprintf( \
"R/%s R (%s)", \
getRversion(), \
paste(getRversion(), \
R.version["platform"], \
R.version["arch"], \
R.version["os"]))); \
install.packages("renv", dependencies = TRUE); \
renv::restore()'
COPY . .