sameli/imate

By sameli

Updated about 1 month ago

Implicit Matrix Trace Estimator

Image
0

390

sameli/imate repository overview

imate

An Ubuntu 20.04 image with imate python package built with NVIDIA CUDA Toolkit 11.4 support.

Download
docker pull sameli/imate
Usage
  • To run the container and open python interpreter directly at startup:

    docker run -it sameli/imate
    

    This also imports imate package automatically.

  • To run the container and open ipython interpreter directly at startup:

    docker run -it sameli/imate ipython
    

    This also imports imate package automatically.

  • To open bash shell only:

    docker run -it --entrypoint /bin/bash sameli/imate
    
  • To mount the host directory /home/user/project on the docker's container directory /root, use:

    docker run -it -v /home/user/project:/root sameli/imate
    
Using Host's GPU

To access host's GPU device from the container, install Nvidia Container Toolkit as follows.

  1. Add the package to the repository:

    distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
    curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
    curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
    
  2. Install nvidia-contaner-toolkit by:

    sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
    
  3. Restart docker to be able to use it:

    sudo systemctl restart docker
    

To use host's GPU, add --gpus all to any of the docker commands given before, such as:

docker run --gpus all -it sameli/imate

To check the host's Nvidia driver version, CUDA runtime library version, and list of available GPU devices, run nvida-smi command, such as by:

docker run --gpus all sameli/imate nvidia-smi
Installed programs
  • CUDA 11: /usr/local/cuda
  • Python 3.9: /usr/bin/python3
  • Python interpreters: ipython, jupyter
  • Editor: vim
  • LaTeX (texlive)

Tag summary

Content type

Image

Digest

sha256:8f08d36b0

Size

1.1 GB

Last updated

about 1 month ago

docker pull sameli/imate