Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Nov 22, 2024
1 parent 924b08f commit 4b7ab43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
11 changes: 6 additions & 5 deletions docker/vscode/R.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ ARG R_VERSION=4.4.2
ARG SESSION_USER=vscode
ARG WORKDIR=/home/${SESSION_USER}/work

SHELL [ "/bin/bash", "-c", "-o", "pipefail" ]
USER root
# From https://docs.posit.co/resources/install-r.html
RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb \
&& apt-get update \
&& apt-get install -y ./r-${R_VERSION}_1_amd64.deb \
&& apt-get install -y --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ./r-${R_VERSION}_1_amd64.deb \
&& sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \
&& sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
&& ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \
&& ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript

USER ${SESSION_USER}
WORKDIR ${WORKDIR}
Expand All @@ -21,5 +22,5 @@ WORKDIR ${WORKDIR}
# The .Rprofile changes allow R to be able to use precompiled packages
# See https://packagemanager.posit.co/client/#/repos/cran/setup
RUN mkdir -p ${WORKDIR}/.rlibs \
&& echo "\nR_LIBS_SITE=\"${WORKDIR}/.rlibs\"\n" >> /home/${SESSION_USER}/.Renviron \
&& echo "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile
&& printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${WORKDIR}" >> /home/${SESSION_USER}/.Renviron \
&& printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile
3 changes: 2 additions & 1 deletion docker/vscode/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm
FROM $BASE_IMAGE
ARG VSCODIUM_VERSION=1.95.2.24313
ARG SESSION_USER=vscode
SHELL [ "/bin/bash", "-c", "-o", "pipefail" ]
RUN apt-get update && \
apt-get install -y curl tini git-lfs && \
apt-get install -y --no-install-recommends curl tini git-lfs && \
mkdir -p /codium-server && \
curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \
rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion docker/vscode/conda.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ ARG SESSION_USER=vscode
ARG WORKDIR=/home/${SESSION_USER}/work
ARG VENVS_PATH=${WORKDIR}/.venvs
ENV VENVS_PATH=${VENVS_PATH}
SHELL [ "/bin/bash", "-c", "-o", "pipefail" ]
USER root
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y curl --no-install-recommends && \
curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o install.sh && \
rm -rf /var/lib/apt/lists/*

Expand Down
3 changes: 2 additions & 1 deletion docker/vscode/poetry.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ ARG POETRY_VERSION=""
ARG SESSION_USER=vscode
ARG WORKDIR=/home/${SESSION_USER}/work
ARG VENVS_PATH=${WORKDIR}/.venvs
SHELL [ "/bin/bash", "-c", "-o", "pipefail" ]
USER root
RUN apt-get update && \
apt-get install -y curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \
apt-get install -y --no-install-recommends curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \
mkdir -p /python-build && \
curl -L https://github.com/pyenv/pyenv/archive/refs/tags/${PYENV_VERSION}.tar.gz | tar -xz -C /python-build && \
/bin/sh /python-build/*/plugins/python-build/install.sh && \
Expand Down

0 comments on commit 4b7ab43

Please sign in to comment.