I would like to run renku on an own machine (as described here Renku on your Own Machine — Renku documentation ), but I’m having trouble getting the GPUs to work.
On the host machine I have installed docker, nvidia drivers and nvidia-container-toolkit. If I run the renku cuda image myself, the GPUs are recognised.
rawlik_m@magnifico ~/r/gict-of-human-breast (master)> docker run --gpus all renku/renkulab-cuda:11.7-55d6c10 nvidia-smi
cat: ./.ssh/authorized_keys: input file is output file
Thu Apr 6 16:24:48 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.48.07 Driver Version: 515.48.07 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:15:00.0 Off | N/A |
| 35% 29C P8 20W / 260W | 5MiB / 11264MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 NVIDIA RTX A5000 On | 00000000:2D:00.0 Off | Off |
| 30% 39C P8 16W / 230W | 75MiB / 24564MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
I have changed the FROM
directive in Dockerfile of my project to use the renku cuda image:
# 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.3.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:11.7-0769e3b
# 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 --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
But when I start the session with renku session start —port 8888
and connect to it, the command nvidia-smi
is not found.
Renku version: 2.3.2.dev20+g35f9d22