Git Product home page Git Product logo

shinystudio-image's Introduction

'Ello World ๐Ÿ‘‹

shinystudio-image's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

shinystudio-image's Issues

Make Compatible with R >= 4.0.0: rocker-versioned2

With R >= 4.0.0 the rocker image comes configured with Ubuntu 20.04 (https://github.com/rocker-org/rocker-versioned2).

I have tried to modify the Dockerfile in order to make it work, with no success.

ARG VER_RLANG="4.0.3"

FROM rocker/verse:${VER_RLANG} as rstudio

FROM scratch

COPY --from=rstudio / /

ARG VER_PYTHON="3.8"
ARG VER_SHINYPROXY="2.4.2"
ARG VER_VSCODE="3.8.0"
ARG TAG="latest"
ENV TAG=${TAG}

# essential vars
ENV DISABLE_AUTH true
ENV R_LIBS_USER /r-libs
ENV APPLICATION_LOGS_TO_STDOUT false

# add shiny immediately and expose port 3838.

RUN /rocker_scripts/install_shiny_server.sh

RUN apt-get update && \
    apt-get install -y apt-transport-https && \
    apt-get install -y curl nano

# install Java 8 and ShinyProxy
RUN apt-get install -y openjdk-8-jdk-headless && \
    mkdir -p /opt/shinyproxy && \
    wget -nv "https://www.shinyproxy.io/downloads/shinyproxy-${VER_SHINYPROXY}.jar" -O /opt/shinyproxy/shinyproxy.jar

COPY configs/shinyproxy/grid-layout /opt/shinyproxy/templates/grid-layout
COPY configs/shinyproxy/application.yml /opt/shinyproxy/application.yml

# create shared /r-libs directory and ensure it's writeable by all.
RUN mkdir /r-libs && \
    echo ".libPaths( c( '/r-libs', .libPaths() ) )" >> /usr/local/lib/R/etc/Rprofile.site

# install R packages
RUN R -e "install.packages(c('tidyverse', 'tidymodels', 'reticulate', 'DBI', 'odbc', 'flexdashboard', 'DT'))" && \
    chmod -R 777 /r-libs

COPY samples /srv/shiny-server

# setup python with miniconda.
ENV VIRTUAL_ENV=py3
RUN wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
    bash /tmp/miniconda.sh -b -p /conda3 && \
    rm -f /tmp/miniconda.sh && \
    /conda3/bin/conda create -y -n $VIRTUAL_ENV python=${VER_PYTHON} && \
    chmod -R 777 /conda3 && \
    /conda3/bin/conda install -y --name $VIRTUAL_ENV jupyter pylint openssl

# set path
ENV PATH "/conda3/bin:${PATH}"
RUN echo "export PATH=\"/conda3/bin:\${PATH}\"" >> /etc/profile && \
    echo ". activate $VIRTUAL_ENV" >> /etc/profile && \
    echo '$env:PATH = "/conda3/envs/$($env:VIRTUAL_ENV)/bin:" + $env:PATH'

# install VS code-server.
RUN wget -nv "https://github.com/cdr/code-server/releases/download/v${VER_VSCODE}/code-server-${VER_VSCODE}-linux-amd64.tar.gz" -O /tmp/vs-code-server.tar.gz && \
    mkdir /tmp/vs-code-server && \
    tar -xzf /tmp/vs-code-server.tar.gz --strip 1 --directory /tmp/vs-code-server && \
    mv -f /tmp/vs-code-server/code-server /usr/local/bin/code-server && \
    rm -rf /tmp/vs-code-server.tar.gz && \
    # unsure why this is necessary, but it solves a fatal 'file not found' error.
    mkdir -p /src/packages/server/build/web && \
    echo '' > /src/packages/server/build/web/index.html

# install SQL Server odbc driver.
RUN apt-get install -y unixodbc && \
    wget -nv https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.6.1.1-1_amd64.deb -O /tmp/msodbcsql.deb && \             
    ACCEPT_EULA=Y dpkg -i /tmp/msodbcsql.deb && \
    rm -f /tmp/msodbcsql.deb

# install PostgreSQL odbc driver.
RUN apt-get install -y odbc-postgresql

# custom configs.
COPY configs/rstudio/rserver.conf /etc/rstudio/rserver_custom.conf

COPY configs/vscode/install-vscode-python.sh /install-vscode-python.sh

COPY configs/odbc/odbcinst.ini /etc/odbcinst.ini
COPY configs/odbc/odbc.ini /etc/odbc.ini

# copy custom run commands.
COPY configs/rstudio/run /etc/services.d/rstudio/run
COPY configs/vscode/run /etc/services.d/vscode/run
COPY configs/shinyproxy/run /etc/services.d/shinyproxy/run

# copy custom start command and make it executable.
COPY configs/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]

CMD [ "shinyproxy" ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.