Hello,
For the sake of time, I wanted to build renku v1 docker images locally so that I can quickly link to them on renku v2 sessions.
However, while Dockerfile locally, I get the following error:
[stage-1 7/8] RUN mamba env update -q -f /tmp/environment.yml && /opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir && mamba clean -y --all && mamba env export -n “root” && rm -rf /home/jovyan/.renku/venv:
0.483
0.483 CondaError: Error encountered while attempting to create cache directory.
0.483 Directory: /home/jovyan/.cache/conda/notices
0.483 Exception: [Errno 13] Permission denied: ‘/home/jovyan/.cache/conda’
This does not happen when images are built on renkulab CI/CD runners.
What do I need to do to fix this?
In case it’s useful, below is the full dockerfile I am using:
########################################################
# Renku install section - do not edit #
FROM renku/renkulab-cuda:12.2-0.24.0 AS builder
# 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=2.9.2
# 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 --no-cache-dir --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\
else \
pip install --no-cache-dir --force renku==${RENKU_VERSION} ;\
fi \
fi \
fi
# End Renku install section #
########################################################
FROM renku/renkulab-cuda:12.2-0.24.0
# 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 --fix-missing
RUN apt-get install -yq --no-install-recommends \
bzip2 \
ca-certificates \
curl \
git \
gpg-agent \
rclone \
vim && \
apt-get purge && \
apt-get clean && \
apt-get autoremove --yes
RUN apt-get update && \
apt-get install -y build-essential htop ncdu screen vim wget git-lfs rsync \
apt-utils binutils
RUN apt-get install -y unzip zip curl wget
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 --no-cache-dir && \
mamba clean -y --all && \
mamba env export -n "root" && \
rm -rf ${HOME}/.renku/venv
COPY --from=builder ${HOME}/.renku/venv ${HOME}/.renku/venv