Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

A containerized version of LambdaStack is available on the SAIL nodes. This container provides a working installation of PyTorch, TensorFlow, CUDA and cuDNN.

This page is a survival guide to get started with this container and use it with your projects. It assumes that you have an opened SSH session on one of the machines.

Start the container

First check that the container image is available using the docker image ls command:

$ docker image ls
REPOSITORY        TAG                       IMAGE ID       CREATED         SIZE
lambda-stack      20.04                     abe4a492cee1   6 hours ago     12GB
ubuntu            latest                    df5de72bdb3b   3 weeks ago     77.8MB
ubuntu            20.04                     3bc6e9f30f51   3 weeks ago     72.8MB
debian            latest                    07d9246c53a6   3 weeks ago     124MB
nvidia/cuda       11.0.3-base-ubuntu20.04   8017f5c31b74   5 weeks ago     122MB
hello-world       latest                    feb5d9fea6a5   11 months ago   13.3kB

You should see the lambda-stack image in the list, this is the one will use for now.

To start a program in the container, use the docker run --rm command:

$ docker run --rm lambda-stack:20.04 ls
TODO add output

The --rm flag ensures that the container is stopped and cleanup after usage. TODO clarify/check this

To run an interactive command like bash or python interpreter, add the -it flag:

$ docker run --rm -it lambda-stack:20.04 bash
TODO add output

So far, the container does not have access to the GPUs. To give it access to them, you need to change the runtime to nvidia and explicitly specify a list of GPUs. The following example uses the first 3 GPUs:

$ docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0,1 --rm lambda-stack:20.04 nvidia-smi
TODO output

This method does not prevent multiple containers to access the same GPUs. Therefore, make sure to check with other users which GPUs they are using.

This method does ensure that your container will not use by mistake any other GPU than the one specified.

TODO mention --gpu too?

Access a folder from the container

A container is isolated from the host environment by default. Bind mounts allow you to mount a folder from the host machine into the container.

Add Python packages to the container

TODO

  • No labels