Skip to content

Commit d431e3b

Browse files
committed
add dockerfile rstudio
1 parent 538e6c8 commit d431e3b

File tree

5 files changed

+98
-1
lines changed

5 files changed

+98
-1
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
- { tag: "base-apps", dockerfile: "apps/Dockerfile", context: "apps"}
1919
- { tag: "inception-minio", dockerfile: "inception/inception-minio/Dockerfile", context: "inception/inception-minio"}
2020
- { tag: "inception-minio-mariadb", dockerfile: "inception/inception-minio-mariadb/Dockerfile", context: "inception/inception-minio-mariadb"}
21-
- { tag: "shinyproxy", dockerfile: "shinyproxy/Dockerfile", context: "shinyproxy"}
21+
- { tag: "shinyproxy", dockerfile: "shinyproxy/Dockerfile", context: "shinyproxy"}
22+
- { tag: "rstudio", dockerfile: "development/rstudio/Dockerfile", context: "development/rstudio"}
2223
- { tag: "prefect-example", dockerfile: "test/prefectexample/Dockerfile", context: "test/prefectexample"}
2324
- { tag: "prefect-inspect", dockerfile: "test/prefectinspect/Dockerfile", context: "test/prefectinspect"}
2425

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
echo "root path: $WWW_ROOT_PATH"
4+
5+
if [[ ! -z $WWW_ROOT_PATH ]]
6+
then
7+
echo "Set www-root-path to $WWW_ROOT_PATH"
8+
echo "www-root-path=$WWW_ROOT_PATH" >> /etc/rstudio/rserver.conf
9+
else
10+
echo "Not setting www-root-path"
11+
fi
12+
13+

development/rstudio/04_copy_env.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
printenv >> /home/$USER/.Renviron

development/rstudio/Dockerfile

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Ubuntu 20.04 with RStudio
2+
FROM ghcr.io/rocker-org/rstudio:4.2.1
3+
4+
##
5+
## System requirements
6+
##
7+
RUN apt-get update \
8+
&& apt-get install -y --no-install-recommends \
9+
wget \
10+
libcurl4-openssl-dev \
11+
libssl-dev \
12+
curl \
13+
bash \
14+
git \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
##
18+
## Install Java 21 from eclipse-temurin (For connection to IRIS)
19+
##
20+
ENV JAVA_HOME=/opt/java/openjdk
21+
COPY --from=eclipse-temurin:21 ${JAVA_HOME} ${JAVA_HOME}
22+
ENV PATH="${JAVA_HOME}/bin:${PATH}"
23+
24+
##
25+
## Intersystems database
26+
##
27+
RUN wget https://github.com/intersystems-community/iris-driver-distribution/raw/main/JDBC/JDK18/intersystems-jdbc-3.8.0.jar --output-document=intersystems-jdbc.jar
28+
29+
##
30+
## Install uv
31+
## Install Python 3.10 and Python package dependencies
32+
##
33+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
34+
RUN apt-get update \
35+
&& apt-get install -y --no-install-recommends \
36+
software-properties-common \
37+
&& rm -rf /var/lib/apt/lists/*
38+
RUN add-apt-repository ppa:deadsnakes/ppa
39+
RUN apt-get update \
40+
&& apt-get install -y --no-install-recommends \
41+
python3.10 python3.10-dev python3.10-tk python3.10-distutils \
42+
&& rm -rf /var/lib/apt/lists/*
43+
44+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && update-alternatives --config python3
45+
COPY requirements.txt .
46+
#RUN python3.10 -m pip install --no-cache-dir -r requirements.txt
47+
#RUN python3 -m pip install --no-cache-dir -r requirements.txt
48+
RUN uv pip install --system --no-cache-dir -r requirements.txt
49+
50+
##
51+
## Rstudio initializations
52+
##
53+
# NB: this file is only used by rocker if the env var DISABLE_AUTH: true is specified in the application.yml
54+
RUN echo "www-frame-origin=same" >> /etc/rstudio/disable_auth_rserver.conf
55+
RUN echo "www-verify-user-agent=0" >> /etc/rstudio/disable_auth_rserver.conf
56+
ADD 03_setup_root_path.sh /etc/cont-init.d/03_setup_root_path.sh
57+
ADD 04_copy_env.sh /etc/cont-init.d/04_copy_env.sh

development/rstudio/requirements.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Backend
2+
pandas
3+
numpy<=1.26.4
4+
pycaprio @ git+https://github.com/JavierLuna/[email protected]#egg=pycaprio
5+
dkpro-cassis==0.9.1
6+
spacy
7+
torch
8+
biopython==1.83.0
9+
jaydebeapi
10+
minio
11+
podman
12+
attrs
13+
pydantic==1.10.11
14+
urllib3==1.26.15
15+
requests-toolbelt==0.10.1
16+
#prefect-ray
17+
prefect-dask
18+
faker==24.0.0
19+
dateparser==1.2.0
20+
babel==2.14.0
21+
python-dotenv==1.0.1
22+
## Frontend
23+
shiny>=0.9.0

0 commit comments

Comments
 (0)