diff --git a/R-minimal/.renku/renku.ini b/R-minimal/.renku/renku.ini index a1eca54..81d7c4c 100644 --- a/R-minimal/.renku/renku.ini +++ b/R-minimal/.renku/renku.ini @@ -1,2 +1,2 @@ -[renku "interactive"] +[interactive] default_url = /rstudio diff --git a/R-minimal/Dockerfile b/R-minimal/Dockerfile index 5b3b49a..20b6c1b 100644 --- a/R-minimal/Dockerfile +++ b/R-minimal/Dockerfile @@ -1,51 +1,51 @@ # For finding latest versions of the base image see # https://github.com/SwissDataScienceCenter/renkulab-docker -ARG RENKU_BASE_IMAGE=renku/renkulab-r:4.2.0-0.12.0 +ARG RENKU_BASE_IMAGE=renku/renkulab-r:4.2.0-0.13.1 FROM ${RENKU_BASE_IMAGE} +######################################################## +# Renku install section - do not edit # + +# RENKU_VERSION determines the version of the renku CLI +# that will be used in this image. To find the latest version, +# visit https://pypi.org/project/renku/#history. +ARG RENKU_VERSION={{ __renku_version__ | default("2.0.0") }} + +# Install renku from pypi or from github if a dev version +RUN if [ -n "$RENKU_VERSION" ] ; then \ + source .renku/venv/bin/activate ; \ + currentversion=$(renku --version) ; \ + if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ + pip uninstall renku -y ; \ + gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ + if [ -n "$gitversion" ] ; then \ + pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ + else \ + pip install --force renku==${RENKU_VERSION} ;\ + fi \ + fi \ + fi +# End renku install section # +######################################################## + # Uncomment and adapt if code is to be included in the image # COPY src /code/src # Uncomment and adapt if your R or python packages require extra linux (ubuntu) software # e.g. the following installs apt-utils and vim; each pkg on its own line, all lines # except for the last end with backslash '\' to continue the RUN line # # USER root # RUN apt-get update && \ # apt-get install -y --no-install-recommends \ # apt-utils \ # vim # USER ${NB_USER} # install the R dependencies COPY install.R /tmp/ RUN R -f /tmp/install.R # install the python dependencies COPY requirements.txt /tmp/ RUN pip3 install -r /tmp/requirements.txt - -# RENKU_VERSION determines the version of the renku CLI -# that will be used in this image. To find the latest version, -# visit https://pypi.org/project/renku/#history. -ARG RENKU_VERSION={{ __renku_version__ | default("1.6.0") }} - -######################################################## -# Do not edit this section and do not add anything below - -# Install renku from pypi or from github if it's a dev version -RUN if [ -n "$RENKU_VERSION" ] ; then \ - source .renku/venv/bin/activate ; \ - currentversion=$(renku --version) ; \ - if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ - pip uninstall renku -y ; \ - gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ - if [ -n "$gitversion" ] ; then \ - pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ - else \ - pip install --force renku==${RENKU_VERSION} ;\ - fi \ - fi \ - fi - -######################################################## diff --git a/R-minimal/README.md b/R-minimal/README.md index 60fbc29..e7c08d3 100644 --- a/R-minimal/README.md +++ b/R-minimal/README.md @@ -1,39 +1,39 @@ # {{ name }} {% if __project_description__ %} {{ __project_description__ }} {% endif %} ## Introduction This is a Renku project - basically a git repository with some bells and whistles. You'll find we have already created some useful things like `data` and `notebooks` directories and a `Dockerfile`. ## Working with the project The simplest way to start your project is right from the Renku platform - just click on the `Sessions` tab and start a new session. This will start an interactive environment right in your browser. To work with the project anywhere outside the Renku platform, click the `Settings` tab where you will find the git repo URLs - use `git` to clone the project on whichever machine you want. -### Changing interactive environment dependencies +### Changing interactive session dependencies Initially we install a very minimal set of packages to keep the images small. However, you can add python and conda packages in `requirements.txt` and `environment.yml`, and R packages to `install.R` (listed as, for example, `install.packages("ggplot2")`), to your heart's content. If you need more fine-grained -control over your environment, please see [the documentation](https://renku.readthedocs.io/en/latest/user/advanced_interfaces.html#dockerfile-modifications). +control over your environment, please see [the documentation](https://renku.readthedocs.io/en/stable/topic-guides/customizing-sessions.html). ## Project configuration Project options can be found in `.renku/renku.ini`. In this project there is currently only one option, which specifies the default type of environment to open, in this case `/rstudio`. ## Moving forward Once you feel at home with your project, we recommend that you replace this README file with your own project documentation! Happy data wrangling! diff --git a/bioc-minimal/.gitlab-ci.yml b/bioc-minimal/.gitlab-ci.yml index 1b8d47b..910df3b 100644 --- a/bioc-minimal/.gitlab-ci.yml +++ b/bioc-minimal/.gitlab-ci.yml @@ -1,21 +1,17 @@ -# renku: v1.dev20180723 - variables: GIT_STRATEGY: fetch GIT_SSL_NO_VERIFY: "true" GIT_LFS_SKIP_SMUDGE: 1 stages: - build image_build: stage: build image: docker:stable before_script: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY - script: - - CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7) - - docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 . - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 - tags: - - image-build + script: | + CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7) + docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 . + docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 diff --git a/bioc-minimal/.renku/renku.ini b/bioc-minimal/.renku/renku.ini index a1eca54..81d7c4c 100644 --- a/bioc-minimal/.renku/renku.ini +++ b/bioc-minimal/.renku/renku.ini @@ -1,2 +1,2 @@ -[renku "interactive"] +[interactive] default_url = /rstudio diff --git a/bioc-minimal/Dockerfile b/bioc-minimal/Dockerfile index b910e4e..1dd88ea 100644 --- a/bioc-minimal/Dockerfile +++ b/bioc-minimal/Dockerfile @@ -1,50 +1,51 @@ # see https://github.com/SwissDataScienceCenter/renkulab-docker # to swap this image for the latest version available -FROM renku/renkulab-bioc:RELEASE_3_15-0.12.0 +FROM renku/renkulab-bioc:RELEASE_3_15-0.13.1 + +######################################################## +# Renku install section - do not edit # + +# RENKU_VERSION determines the version of the renku CLI +# that will be used in this image. To find the latest version, +# visit https://pypi.org/project/renku/#history. +ARG RENKU_VERSION={{ __renku_version__ | default("2.0.0") }} + +# Install renku from pypi or from github if a dev version +RUN if [ -n "$RENKU_VERSION" ] ; then \ + source .renku/venv/bin/activate ; \ + currentversion=$(renku --version) ; \ + if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ + pip uninstall renku -y ; \ + gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ + if [ -n "$gitversion" ] ; then \ + pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ + else \ + pip install --force renku==${RENKU_VERSION} ;\ + fi \ + fi \ + fi +# End renku install section # +######################################################## + # Uncomment and adapt if code is to be included in the image # COPY src /code/src # Uncomment and adapt if your R or python packages require extra linux (ubuntu) software # e.g. the following installs apt-utils and vim; each pkg on its own line, all lines # except for the last end with backslash '\' to continue the RUN line # # USER root # RUN apt-get update && \ # apt-get install -y --no-install-recommends \ # apt-utils \ # vim # USER ${NB_USER} # install the R dependencies COPY install.R /tmp/ RUN R -f /tmp/install.R # install the python dependencies COPY requirements.txt /tmp/ RUN pip3 install -r /tmp/requirements.txt - -# RENKU_VERSION determines the version of the renku CLI -# that will be used in this image. To find the latest version, -# visit https://pypi.org/project/renku/#history. -ARG RENKU_VERSION={{ __renku_version__ | default("1.6.0") }} - -######################################################## -# Do not edit this section and do not add anything below - -# Install renku from pypi or from github if it's a dev version -RUN if [ -n "$RENKU_VERSION" ] ; then \ - source .renku/venv/bin/activate ; \ - currentversion=$(renku --version) ; \ - if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ - pip uninstall renku -y ; \ - gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ - if [ -n "$gitversion" ] ; then \ - pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ - else \ - pip install --force renku==${RENKU_VERSION} ;\ - fi \ - fi \ - fi - -######################################################## diff --git a/bioc-minimal/README.md b/bioc-minimal/README.md index 60fbc29..e7c08d3 100644 --- a/bioc-minimal/README.md +++ b/bioc-minimal/README.md @@ -1,39 +1,39 @@ # {{ name }} {% if __project_description__ %} {{ __project_description__ }} {% endif %} ## Introduction This is a Renku project - basically a git repository with some bells and whistles. You'll find we have already created some useful things like `data` and `notebooks` directories and a `Dockerfile`. ## Working with the project The simplest way to start your project is right from the Renku platform - just click on the `Sessions` tab and start a new session. This will start an interactive environment right in your browser. To work with the project anywhere outside the Renku platform, click the `Settings` tab where you will find the git repo URLs - use `git` to clone the project on whichever machine you want. -### Changing interactive environment dependencies +### Changing interactive session dependencies Initially we install a very minimal set of packages to keep the images small. However, you can add python and conda packages in `requirements.txt` and `environment.yml`, and R packages to `install.R` (listed as, for example, `install.packages("ggplot2")`), to your heart's content. If you need more fine-grained -control over your environment, please see [the documentation](https://renku.readthedocs.io/en/latest/user/advanced_interfaces.html#dockerfile-modifications). +control over your environment, please see [the documentation](https://renku.readthedocs.io/en/stable/topic-guides/customizing-sessions.html). ## Project configuration Project options can be found in `.renku/renku.ini`. In this project there is currently only one option, which specifies the default type of environment to open, in this case `/rstudio`. ## Moving forward Once you feel at home with your project, we recommend that you replace this README file with your own project documentation! Happy data wrangling! diff --git a/julia-minimal/.gitlab-ci.yml b/julia-minimal/.gitlab-ci.yml index 1b8d47b..910df3b 100644 --- a/julia-minimal/.gitlab-ci.yml +++ b/julia-minimal/.gitlab-ci.yml @@ -1,21 +1,17 @@ -# renku: v1.dev20180723 - variables: GIT_STRATEGY: fetch GIT_SSL_NO_VERIFY: "true" GIT_LFS_SKIP_SMUDGE: 1 stages: - build image_build: stage: build image: docker:stable before_script: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY - script: - - CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7) - - docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 . - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 - tags: - - image-build + script: | + CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7) + docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 . + docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 diff --git a/julia-minimal/.renku/renku.ini b/julia-minimal/.renku/renku.ini index ea54fd2..47765e4 100644 --- a/julia-minimal/.renku/renku.ini +++ b/julia-minimal/.renku/renku.ini @@ -1,3 +1,3 @@ -[renku "interactive"] +[interactive] default_url = /lab mem_request = 2G diff --git a/julia-minimal/Dockerfile b/julia-minimal/Dockerfile index d830c83..84010c1 100644 --- a/julia-minimal/Dockerfile +++ b/julia-minimal/Dockerfile @@ -1,56 +1,56 @@ # For finding latest versions of the base image see # https://github.com/SwissDataScienceCenter/renkulab-docker -ARG RENKU_BASE_IMAGE=renku/renkulab-julia:1.7.1-0.12.0 +ARG RENKU_BASE_IMAGE=renku/renkulab-julia:1.7.1-0.13.1 FROM ${RENKU_BASE_IMAGE} +######################################################## +# Renku install section - do not edit # + +# RENKU_VERSION determines the version of the renku CLI +# that will be used in this image. To find the latest version, +# visit https://pypi.org/project/renku/#history. +ARG RENKU_VERSION={{ __renku_version__ | default("2.0.0") }} + +# Install renku from pypi or from github if a dev version +RUN if [ -n "$RENKU_VERSION" ] ; then \ + source .renku/venv/bin/activate ; \ + currentversion=$(renku --version) ; \ + if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ + pip uninstall renku -y ; \ + gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ + if [ -n "$gitversion" ] ; then \ + pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ + else \ + pip install --force renku==${RENKU_VERSION} ;\ + fi \ + fi \ + fi +# End Renku install section # +######################################################## + # Uncomment and adapt if code is to be included in the image # COPY src /code/src # Uncomment and adapt if your python, R, or Julia packages require extra linux (ubuntu) software # e.g. the following installs apt-utils and vim; each pkg on its own line, all lines # except for the last end with backslash '\' to continue the RUN line # # USER root # RUN apt-get update && \ # apt-get install -y --no-install-recommends \ # apt-utils \ # vim # USER ${NB_USER} # install the python dependencies COPY requirements.txt environment.yml /tmp/ -RUN conda env update -q -f /tmp/environment.yml && \ +RUN mamba env update -q -f /tmp/environment.yml && \ /opt/conda/bin/pip install -r /tmp/requirements.txt && \ - conda clean -y --all && \ - conda env export -n "root" + mamba clean -y --all && \ + mamba env export -n "root" # download and precompile any libaries to speed up startup time COPY Project.toml Manifest.toml /tmp/ RUN mkdir /tmp/julia-pkg && \ cp /tmp/Project.toml /tmp/Manifest.toml /tmp/julia-pkg/ && \ julia -e'using Pkg; Pkg.activate("/tmp/julia-pkg/"); Pkg.instantiate(); Pkg.precompile()' - -# RENKU_VERSION determines the version of the renku CLI -# that will be used in this image. To find the latest version, -# visit https://pypi.org/project/renku/#history. -ARG RENKU_VERSION={{ __renku_version__ | default("1.6.0") }} - -######################################################## -# Do not edit this section and do not add anything below - -# Install renku from pypi or from github if it's a dev version -RUN if [ -n "$RENKU_VERSION" ] ; then \ - source .renku/venv/bin/activate ; \ - currentversion=$(renku --version) ; \ - if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ - pip uninstall renku -y ; \ - gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ - if [ -n "$gitversion" ] ; then \ - pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ - else \ - pip install --force renku==${RENKU_VERSION} ;\ - fi \ - fi \ - fi - -######################################################## diff --git a/julia-minimal/README.md b/julia-minimal/README.md index 11bd855..9dc4d0c 100644 --- a/julia-minimal/README.md +++ b/julia-minimal/README.md @@ -1,44 +1,44 @@ # {{ name }} {% if __project_description__ %} {{ __project_description__ }} {% endif %} ## Introduction This is a Renku project with support for **Julia** - basically a git repository with some bells and whistles. You'll find we have already created some useful things like `data` and `notebooks` directories and a `Dockerfile`. ## Working with the project The simplest way to start your project is right from the Renku platform - just click on the `Sessions` tab and start a new session. This will start an interactive environment right in your browser. To work with the project anywhere outside the Renku platform, click the `Settings` tab where you will find the git repo URLs - use `git` to clone the project on whichever machine you want. -### Changing interactive environment dependencies +### Changing interactive session dependencies Initially we install a very minimal set of packages to keep the images small. However, you can add Julia packages as you normally would: for example, you can start a Julia REPL on the Terminal and use the `pkg` mode, or you can use the `Pkg` API from within a Jupyter Notebook or Console. If a Julia package has python dependencies, you can add them by modifying `requirements.txt` or `environment.yml` (conda) If you need more -fine-grained control over your environment, please see [the documentation](https://renku.readthedocs.io/en/latest/user/advanced_interfaces.html#dockerfile-modifications). +fine-grained control over your environment, please see [the documentation](https://renku.readthedocs.io/en/stable/topic-guides/customizing-sessions.html). ## Project configuration Project options can be found in `.renku/renku.ini`. In this project there is currently only one option, which specifies the default type of environment to open, in this case `/lab` for JupyterLab. You may also choose `/tree` to get to the "classic" Jupyter interface. ## Moving forward Once you feel at home with your project, we recommend that you replace this README file with your own project documentation! Happy data wrangling! diff --git a/minimal/.renku/renku.ini b/minimal/.renku/renku.ini index 5a3d87d..1659a57 100644 --- a/minimal/.renku/renku.ini +++ b/minimal/.renku/renku.ini @@ -1,2 +1,2 @@ -[renku "interactive"] +[interactive] default_url = /lab diff --git a/minimal/Dockerfile b/minimal/Dockerfile index 4099b2f..76103e7 100644 --- a/minimal/Dockerfile +++ b/minimal/Dockerfile @@ -1,55 +1,55 @@ # For finding latest versions of the base image see # https://github.com/SwissDataScienceCenter/renkulab-docker -ARG RENKU_BASE_IMAGE=renku/renkulab-py:3.9-0.12.0 +ARG RENKU_BASE_IMAGE=renku/renkulab-py:3.9-0.13.1 FROM ${RENKU_BASE_IMAGE} +######################################################## +# Renku install section - do not edit # + +# RENKU_VERSION determines the version of the renku CLI +# that will be used in this image. To find the latest version, +# visit https://pypi.org/project/renku/#history. +ARG RENKU_VERSION={{ __renku_version__ | default("2.0.0") }} + +# Install renku from pypi or from github if a dev version +RUN if [ -n "$RENKU_VERSION" ] ; then \ + source .renku/venv/bin/activate ; \ + currentversion=$(renku --version) ; \ + if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ + pip uninstall renku -y ; \ + gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ + if [ -n "$gitversion" ] ; then \ + pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ + else \ + pip install --force renku==${RENKU_VERSION} ;\ + fi \ + fi \ + fi +# End renku install section # +######################################################## + # Uncomment and adapt if code is to be included in the image # COPY src /code/src # Uncomment and adapt if your R or python packages require extra linux (ubuntu) software # e.g. the following installs apt-utils and vim; each pkg on its own line, all lines # except for the last end with backslash '\' to continue the RUN line # # USER root # RUN apt-get update && \ # apt-get install -y --no-install-recommends \ # apt-utils \ # vim # USER ${NB_USER} # Uncomment and adapt if you want to automatically install # python dependencies when the Docker image builds (pip or conda) # Note: you will need to add a (pip) requirements.txt file # AND a (conda) environment.yml file for the below code to run, # but you can remove one or the other. # # COPY requirements.txt environment.yml /tmp/ # RUN conda env update -q -f /tmp/environment.yml && \ # /opt/conda/bin/pip install -r /tmp/requirements.txt && \ # conda clean -y --all && \ # conda env export -n "root" - -# RENKU_VERSION determines the version of the renku CLI -# that will be used in this image. To find the latest version, -# visit https://pypi.org/project/renku/#history. -ARG RENKU_VERSION={{ __renku_version__ | default("1.6.0") }} - -######################################################## -# Do not edit this section and do not add anything below - -# Install renku from pypi or from github if it's a dev version -RUN if [ -n "$RENKU_VERSION" ] ; then \ - source .renku/venv/bin/activate ; \ - currentversion=$(renku --version) ; \ - if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ - pip uninstall renku -y ; \ - gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ - if [ -n "$gitversion" ] ; then \ - pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ - else \ - pip install --force renku==${RENKU_VERSION} ;\ - fi \ - fi \ - fi - -######################################################## diff --git a/python-minimal/.renku/renku.ini b/python-minimal/.renku/renku.ini index 5a3d87d..1659a57 100644 --- a/python-minimal/.renku/renku.ini +++ b/python-minimal/.renku/renku.ini @@ -1,2 +1,2 @@ -[renku "interactive"] +[interactive] default_url = /lab diff --git a/python-minimal/Dockerfile b/python-minimal/Dockerfile index 47a1c4d..6b6df07 100644 --- a/python-minimal/Dockerfile +++ b/python-minimal/Dockerfile @@ -1,50 +1,51 @@ # For finding latest versions of the base image see # https://github.com/SwissDataScienceCenter/renkulab-docker -ARG RENKU_BASE_IMAGE=renku/renkulab-py:3.9-0.12.0 +ARG RENKU_BASE_IMAGE=renku/renkulab-py:3.9-0.13.1 FROM ${RENKU_BASE_IMAGE} -# Uncomment and adapt if code is to be included in the image -# COPY src /code/src -# Uncomment and adapt if your R or python packages require extra linux (ubuntu) software -# e.g. the following installs apt-utils and vim; each pkg on its own line, all lines -# except for the last end with backslash '\' to continue the RUN line -# -# USER root -# RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# apt-utils \ -# vim -# USER ${NB_USER} - -# install the python dependencies -COPY requirements.txt environment.yml /tmp/ -RUN conda env update -q -f /tmp/environment.yml && \ - /opt/conda/bin/pip install -r /tmp/requirements.txt && \ - conda clean -y --all && \ - conda env export -n "root" +######################################################## +# Renku install section - do not edit # # RENKU_VERSION determines the version of the renku CLI # that will be used in this image. To find the latest version, # visit https://pypi.org/project/renku/#history. -ARG RENKU_VERSION={{ __renku_version__ | default("1.6.0") }} - -######################################################## -# Do not edit this section and do not add anything below +ARG RENKU_VERSION={{ __renku_version__ | default("2.0.0") }} -# Install renku from pypi or from github if it's a dev version +# Install renku from pypi or from github if a dev version RUN if [ -n "$RENKU_VERSION" ] ; then \ source .renku/venv/bin/activate ; \ currentversion=$(renku --version) ; \ if [ "$RENKU_VERSION" != "$currentversion" ] ; then \ pip uninstall renku -y ; \ gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \ if [ -n "$gitversion" ] ; then \ pip install --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\ else \ pip install --force renku==${RENKU_VERSION} ;\ fi \ fi \ fi - +# End renku install section # ######################################################## + +# Uncomment and adapt if code is to be included in the image +# COPY src /code/src + +# Uncomment and adapt if your R or python packages require extra linux (ubuntu) software +# e.g. the following installs apt-utils and vim; each pkg on its own line, all lines +# except for the last end with backslash '\' to continue the RUN line +# +# USER root +# RUN apt-get update && \ +# apt-get install -y --no-install-recommends \ +# apt-utils \ +# vim +# USER ${NB_USER} + +# install the python dependencies +COPY requirements.txt environment.yml /tmp/ +RUN mamba env update -q -f /tmp/environment.yml && \ + /opt/conda/bin/pip install -r /tmp/requirements.txt && \ + mamba clean -y --all && \ + mamba env export -n "root" diff --git a/python-minimal/README.md b/python-minimal/README.md index 9583ead..ae87c27 100644 --- a/python-minimal/README.md +++ b/python-minimal/README.md @@ -1,40 +1,40 @@ # {{ name }} {% if __project_description__ %} {{ __project_description__ }} {% endif %} ## Introduction This is a Renku project - basically a git repository with some bells and whistles. You'll find we have already created some useful things like `data` and `notebooks` directories and a `Dockerfile`. ## Working with the project The simplest way to start your project is right from the Renku platform - just click on the `Sessions` tab and start a new session. This will start an interactive environment right in your browser. To work with the project anywhere outside the Renku platform, click the `Settings` tab where you will find the git repo URLs - use `git` to clone the project on whichever machine you want. -### Changing interactive environment dependencies +### Changing interactive session dependencies Initially we install a very minimal set of packages to keep the images small. However, you can add python and conda packages in `requirements.txt` and `environment.yml` to your heart's content. If you need more fine-grained -control over your environment, please see [the documentation](https://renku.readthedocs.io/en/latest/user/advanced_interfaces.html#dockerfile-modifications). +control over your environment, please see [the documentation](https://renku.readthedocs.io/en/stable/topic-guides/customizing-sessions.html). ## Project configuration Project options can be found in `.renku/renku.ini`. In this project there is currently only one option, which specifies the default type of environment to open, in this case `/lab` for JupyterLab. You may also choose `/tree` to get to the "classic" Jupyter interface. ## Moving forward Once you feel at home with your project, we recommend that you replace this README file with your own project documentation! Happy data wrangling!