Skip to content

Commit

Permalink
Merge pull request #255 from davidycliao/0.0.7
Browse files Browse the repository at this point in the history
0.0.7
  • Loading branch information
davidycliao authored Dec 30, 2024
2 parents 54702b7 + 8bb8209 commit ee4cf7d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches: [main, master]


jobs:
R-CMD-check:
runs-on: ubuntu-latest
Expand Down
43 changes: 25 additions & 18 deletions Dockerfile
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"]

0 comments on commit ee4cf7d

Please sign in to comment.