-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from davidycliao/0.0.7
0.0.7
- Loading branch information
Showing
2 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
pull_request: | ||
branches: [main, master] | ||
|
||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
FROM r-base:latest | ||
LABEL maintainer="Yen-Chieh Liao <davidycliao@gmail.com>" | ||
FROM rocker/r-ver:latest | ||
|
||
# dependencies | ||
# 安装系统依赖 | ||
RUN apt-get update && apt-get install -y \ | ||
python3 \ | ||
python3-minimal \ | ||
python3-pip \ | ||
python3-venv \ | ||
python3-full \ | ||
libcurl4-openssl-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libfontconfig1-dev \ | ||
libharfbuzz-dev \ | ||
libfribidi-dev \ | ||
libfreetype6-dev \ | ||
libpng-dev \ | ||
libtiff5-dev \ | ||
libjpeg-dev | ||
|
||
# creation of env | ||
gdebi-core \ | ||
wget | ||
|
||
# 安装 RStudio Server | ||
RUN wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2023.12.1-402-amd64.deb && \ | ||
gdebi -n rstudio-server-2023.12.1-402-amd64.deb && \ | ||
rm rstudio-server-*.deb | ||
|
||
# 创建并使用 Python 虚拟环境 | ||
RUN python3 -m venv /opt/venv | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
# Flair | ||
RUN /opt/venv/bin/pip install flair | ||
# Python 安装 | ||
RUN /opt/venv/bin/pip install --no-cache-dir flair | ||
|
||
# CRAN mirror | ||
# R 包安装 | ||
RUN R -e "install.packages(c('remotes', 'reticulate'))" && \ | ||
R -e "remotes::install_github('davidycliao/flaiR', dependencies = FALSE)" | ||
|
||
CMD ["R"] | ||
# 暴露 RStudio Server 端口 | ||
EXPOSE 8787 | ||
|
||
# 创建用户 | ||
ENV USER=rstudio | ||
ENV PASSWORD=rstudio | ||
|
||
# 启动 RStudio Server | ||
CMD ["/usr/lib/rstudio-server/bin/rserver", "--server-daemonize=0"] |