Skip to content

Commit

Permalink
Merge pull request #16 from 392781/main
Browse files Browse the repository at this point in the history
Cleaned up Dockerfile for reproducible system/language packages
  • Loading branch information
392781 authored Feb 17, 2024
2 parents a6ed0fc + 6e657c0 commit cfa1dae
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ To create your setup, follow these steps:

Copying from template version 1.0.0
create .
create example.Rmd
create README.md
create example.Rmd
create .devcontainer
create .devcontainer/Dockerfile
create .devcontainer/devcontainer.json
Expand Down
4 changes: 2 additions & 2 deletions copier.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project_name:
type: str
help: What is the name of your project? (Must be unique and use lowercase, dashes -, underscores _ ONLY)
help: What is the name of your project? (Must be unique!)
validator: >-
{% if not (project_name | regex_search('^[a-z][a-z0-9\-\_]+$')) %}
Project name must start with a letter, followed one or more letters, digits or dashes all lowercase.
Expand Down Expand Up @@ -38,4 +38,4 @@ _subdirectory: template

_exclude:
- "copier.yml"
- ".git"
- ".git"
53 changes: 39 additions & 14 deletions template/.devcontainer/Dockerfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ RUN apt-get update && \
libpq5=14.10-0ubuntu0.22.04.1 \
libtiff-dev=4.3.0-6ubuntu0.7 \
{%- endif %}
##############################################################
### Add your own dependencies as needed below this comment ###
##############################################################
###################################################
### Add your own system dependencies installed ###
### with `apt-get` as needed below this comment ###
### Example (note the backslash after name): ###
### neofetch \ ###
###################################################
&& \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
Expand Down Expand Up @@ -77,26 +80,48 @@ RUN wget -q https://download2.rstudio.org/server/jammy/amd64/rstudio-server-${R_
#########################
USER ${NB_USER}
### Anaconda (conda/mamba) packages
RUN mamba install -y -c conda-forge --freeze-installed \
# Jupyter setup
jupyter-server-proxy=4.1.0 \
{% if 'R' in dev_language %}jupyter-rsession-proxy=2.2.0{% endif %} \
{% if 'R' in dev_language %}jupyter-rsession-proxy=2.2.0 \{% endif %}
#######################################################
### Add your own conda dependencies installed with ###
### `conda/mamba` as needed below this comment ###
### Example (note the backslash after name): ###
### scikit-learn \ ###
#######################################################
&& \
mamba clean --all
### PyPI (pip) packages
RUN pip install \
nbgitpuller \
{% if use_quarto %}jupyterlab-quarto==0.2.8 \{% endif %}
{% if ('R' in dev_language) %}radian==0.6.11 \{% endif %}
################################################
### Add your own PyPI dependencies installed ###
### with `pip` as needed below this comment ###
### Example (note the backslash after name): ###
### scikit-ntk \ ###
################################################
&& \
mamba clean --all && \
pip install nbgitpuller && \
jupyter labextension enable nbgitpuller
{% if use_quarto %}
### Quarto
RUN pip install jupyterlab-quarto==0.2.8
{%- endif %}
{% if ('R' in dev_language) %}
### R development
RUN pip install radian==0.6.11 && \
### R packages
# Versioned
R -q -e 'remotes::install_version("markdown", version="1.12", repos="cloud.r-project.org")' && \
RUN R -q -e 'remotes::install_version("markdown", version="1.12", repos="cloud.r-project.org")' && \
R -q -e 'remotes::install_version("languageserver", version="0.3.16", repos="cloud.r-project.org")' && \
# Latest Dev Versions
R -q -e 'remotes::install_github("nx10/httpgd")' && \
R -q -e 'remotes::install_github("ManuelHentschel/vscDebugger")'
R -q -e 'remotes::install_github("ManuelHentschel/vscDebugger")' && \
##########################################################
### Add your own R dependencies installed as needed ###
### below this comment but before `echo`. ###
### Example (note the `&& \` after the command): ###
### R -q -e 'install.packages("dplyr")' && \ ###
##########################################################
echo
{%- endif %}
### Prints Jupyter server token when terminal is opened
Expand Down

0 comments on commit cfa1dae

Please sign in to comment.