Skip to content
alwinm edited this page Sep 27, 2022 · 5 revisions

(Page Work in progress)

Using Docker containers

The current use case for Docker containers is limited to compiling Cholla. Currently, @alwinm believes that it is difficult to get Docker to run Cholla on AMD GPUs, and has not yet experimented with running Cholla with Nvidia GPUs.

Creating Docker containers

This section is for Cholla maintainers and contains information for creating and uploading Docker containers.

Prerequisites: install Docker and make a hub.docker.com account, which is like GitHub for docker containers and will allow GitHub actions to download your container after you upload it.

Basic Dockerfile examples: `

A basic ubuntu Docker

FROM ubuntu `

`

Ubuntu with cuda development tools installed

FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 `

`

Ubuntu with rocm installed

FROM rocm/dev-ubuntu-20.04:5.2.3 `

`

Build Docker container with given tag name using Dockerfile in current directory

docker build -t .

Run Docker container with given tag name using /bin/bash as the shell

docker run -it /bin/bash

Rename Docker image when you are ready to push to docker hub

docker tag

Log into your account at hub.docker.com

docker login -u hub.docker.com

Push your image with tagname to hub.docker.com

docker push `

Basic explanation of Dockerfile commands: `

FROM starts a docker container using the image name

FROM

RUN runs the command and saves the resulting difference as a Docker layer

This example installs git. WARNING: apt-get update must be in same line as apt-get install

RUN apt-get -y update && apt-get -y install git

ENV sets an environment variable

This example tells Cholla to use make.host.github through the environment variable CHOLLA_MACHINE

ENV CHOLLA_MACHINE=github `

Clone this wiki locally