Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New template for batch execution #118

Closed
TaoSunVoyage opened this issue Jul 6, 2021 · 1 comment
Closed

New template for batch execution #118

TaoSunVoyage opened this issue Jul 6, 2021 · 1 comment
Assignees
Labels
kind/enhancement New feature or request

Comments

@TaoSunVoyage
Copy link

TaoSunVoyage commented Jul 6, 2021

For batch execution described in SwissDataScienceCenter/renku/issues/1929, we suggest to create a new template.

Compare to the original template, this one:

  • w/ Dockerfile.batch - based on a batch version image Add batch version image renkulab-docker#172
  • w/o environment.yml - not to use conda for dependencies
  • extra job in .gitlab-ci.yml to build and push the batch image automatically

Such template can be useful for batch execution with commands proposed in SwissDataScienceCenter/renku-python/issues/2213

Dockerfile.batch, for example:

ARG RENKU_BASE_IMAGE=renku/renkulab-batch
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 /tmp/
RUN pip 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=0.15.1

########################################################
# Do not edit this section and do not add anything below

RUN if [ -n "$RENKU_VERSION" ] ; then \
    pipx uninstall renku && \
    pipx install --force renku==${RENKU_VERSION} \
    ; fi

########################################################

Extra job in .gitlab-ci.yml, for example:

batch_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-batch -f Dockerfile.batch .
    docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7-batch
@rokroskar
Copy link
Member

I'm not sure we need a new template for this but rather a rethinking of where some batch runtimes should be included with every renku project.

Repository owner moved this from Backlog to Done in renku-python Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants