-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (55 loc) · 2.33 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
# Set timezone:
RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone
# Set locales:
RUN apt-get update && apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
RUN apt-get install -y --no-install-recommends software-properties-common dirmngr wget && \
sh -c 'wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc' && \
add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/" && \
apt-get install -y --no-install-recommends \
r-base \
r-base-dev \
gdb \
lcov \
libbz2-dev \
libffi-dev \
libgdbm-dev \
liblzma-dev \
libncurses5-dev \
libreadline6-dev \
libsqlite3-dev \
libssl-dev \
lzma \
lzma-dev \
tk-dev \
uuid-dev \
xvfb \
zlib1g-dev \
git \
build-essential \
uuid-runtime \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
libcurl4-openssl-dev \
libxml2-dev
RUN useradd -m rstudio && \
chgrp rstudio /usr/local/lib/R/site-library && \
chmod g+w -R /usr/local/lib/R/site-library
USER rstudio
WORKDIR /home/rstudio
RUN R -e 'install.packages(c("tensorflow", "reticulate","tfdatasets"),Ncpus = 12);library(reticulate);path_to_python <- install_python();virtualenv_create("r-reticulate", python = path_to_python);install.packages("keras");library(keras);install_keras(envname = "r-reticulate");install.packages("tidyverse",Ncpus = 12)'
USER root
RUN wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2023.03.0-386-amd64.deb && apt-get install -y ./rstudio-server-2023.03.0-386-amd64.deb && rm rstudio-server-2023.03.0-386-amd64.deb
COPY startup.sh /usr/local/bin/startup.sh
RUN uuidgen -x | tr -d '-' > /etc/rstudio/secure-cookie-key && rm -f /etc/init.d/rstudio-server && chmod +x /usr/local/bin/startup.sh
RUN wget https://github.com/caddyserver/caddy/releases/download/v2.6.1/caddy_2.6.1_linux_amd64.deb && apt install -y ./caddy_2.6.1_linux_amd64.deb && rm caddy_2.6.1_linux_amd64.deb
ENTRYPOINT ["/usr/local/bin/startup.sh"]