Sign inSign up

rasilab/default

By rasilab

Updated over 4 years ago

VScode development container for writing and data analyses in the Subramaniam lab

Image
0

108

rasilab/default repository overview

Useful for:

  • Converting Markdown documents into PDF via pandoc and XeLaTeX within VScode
  • Running Python and R Jupyter notebooks within VScode

To use this container, create a .devcontainer.json file with the following contents and open the corresponding folder in VScode that is set up for remote development (see here).

{
  "image": "rasilab/default:1.0.0"
}

This image was created using the following Dockerfile:

FROM qmcgaw/latexdevcontainer:latest

USER root
WORKDIR /tmp
# Install pandoc
RUN wget https://github.com/jgm/pandoc/releases/download/2.17/pandoc-2.17-1-amd64.deb
RUN dpkg -i pandoc-2.17-1-amd64.deb

# Install conda and python
# Install conda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh -O miniconda.sh
RUN bash miniconda.sh -b -p /opt/conda
# Put conda in PATH 
ENV CONDA_DIR /opt/conda
ENV PATH=$CONDA_DIR/bin:$PATH
# Set up shell for conda activation
RUN eval "$(conda shell.bash hook)"

# Install pandoc filter extension
RUN conda run -n base pip install pandocfilters

# Update Latex installer
RUN tlmgr update --self

# Install Xelatex
RUN apt install -y libfontconfig1 
# to prevent error messages during xetex install
RUN tlmgr update texlive-scripts
RUN tlmgr install xetex

# Latex packages
RUN tlmgr install setspace \
                  unicode-math \
                  xcolor \
                  booktabs \
                  etoolbox \
                  lineno \
                  caption \
                  float \
                  enumitem

# copy Helvetica font
COPY .install/fonts/ /usr/share/fonts/truetype/helvetica/

# Install Python conda environment
COPY .install/python_environment.yml /tmp/
RUN conda env create -f /tmp/python_environment.yml

# Install R conda environment
COPY .install/R_environment.yml /tmp/
RUN conda env create -f /tmp/R_environment.yml

# Set up R jupyter kernel and make it visible to python
ENV PATH="$PATH:/opt/conda/envs/py/bin"
RUN /opt/conda/envs/R/bin/R -s -e "IRkernel::installspec()"

Tag summary

Content type

Image

Digest

Size

2.1 GB

Last updated

over 4 years ago

docker pull rasilab/default:1.0.0