You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding dev/* dockerfiles meant to serve as base images
New dockerfiles exist in a subdirectory called /dev. These are
meant to serve as base docker images downstream dockerfiles
use in FROM statements
Fixed stale URL's and fixed up the name of the rocm kernel packages.
Copy file name to clipboardExpand all lines: README.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ When working with the ROCm containers, the following are common and useful docke
32
32
* Follow the documentation in the [quick start guide](quick-start.md) for a solution to change to the storage driver
33
33
34
34
#### Saving work in a container
35
-
Docker containers are typically ephemeral, and are discarded after closing the container with the '**--rm**' flag to `docker run`. However, there are times when it is desirable to close a container that has arbitrary work in it, and serialize it back into a docker image. This may be to to create a checkpoint in a long and complicated series of instructions, or it may be desired to share the image with others through a docker registry, such as docker hub.
35
+
Docker containers are typically ephemeral, and are discarded after closing the container with the '**--rm**' flag to `docker run`. However, there are times when it is desirable to close a container that has arbitrary work in it, and serialize it back into a docker image. This may be to to create a checkpoint in a long and complicated series of instructions, or it may be desired to share the image with others through a docker registry, such as docker hub.
36
36
37
37
```bash
38
38
sudo docker ps -a # Find container of interest
@@ -49,15 +49,15 @@ An [apt-get repository](https://github.com/RadeonOpenCompute/ROCm/wiki#installin
49
49
50
50
## Building images
51
51
There are two ways to install rocm components:
52
-
1. install from the rocm apt/rpm repository (packages.amd.com)
52
+
1. install from the rocm apt/rpm repository (repo.radeon.com)
53
53
2. build the components from source and run install scripts
54
54
55
55
The first method produces docker images with the smallest footprint and best building speed. The footprint is smaller because no developer tools need to be installed in the image, an the images build speed is fastest because typically downloading binaries is much faster than downloading source and then invoking a build process. Of course, building components allows much greater flexibility on install location and the ability to step through the source with debug builds. ROCm-docker supports making images either way, and depends on the flags passed to the setup script.
56
56
57
57
The setup script included in this repository is provides some flexibility to how docker containers are constructed. Unfortunately, Dockerfiles do not have a preprocessor or template language, so typically build instructions are hardcoded. However, the setup script allows us to write a primitive 'template', and after running it instantiates baked dockerfiles with environment variables substituted in. For instance, if you wish to build release images and debug images, first run the setup script to generate release dockerfiles and build the images. Then, run the setup script again and specify debug dockerfiles and build new images. The docker images should generate unique image names and not conflict with each other.
58
58
59
59
## setup.sh
60
-
Currently, the setup.sh scripts checks to make sure that it is running on an **Ubuntu system**, as it makes a few assumptions about the availability of tools and file locations. If running rocm on a Fedora machine, inspect the source of setup.sh and issue the appropriate commands manually. There are a few parameters to setup.sh of a generic nature that affects all images built after running. If no parameters are given, built images will be based off of Ubuntu 16.04 with rocm components installed from debians downloaded from packages.amd.com. Supported parameters can be queried with `./setup --help`.
60
+
Currently, the setup.sh scripts checks to make sure that it is running on an **Ubuntu system**, as it makes a few assumptions about the availability of tools and file locations. If running rocm on a Fedora machine, inspect the source of setup.sh and issue the appropriate commands manually. There are a few parameters to setup.sh of a generic nature that affects all images built after running. If no parameters are given, built images will be based off of Ubuntu 16.04 with rocm components installed from debians downloaded from repo.radeon.com. Supported parameters can be queried with `./setup --help`.
@@ -75,10 +75,10 @@ The following parameters are specific to building containers that compile rocm c
75
75
`./setup` generates finalized Dockerfiles from textual template files ending with the *.template* suffix. Each sub-directory of this repository corresponds to a docker 'build context' responsible for a software layer in the ROCm stack. After running the script, each directory contains generated dockerfiles for building images from debians and from source.
76
76
77
77
### Docker compose
78
-
`./setup` prepares an environment to be controlled with [Docker Compose](https://docs.docker.com/compose/). While docker-compose is not necessary for proper operation, it is highly recommended. setup.sh does provide a flag to simplify the installation of this tool. Docker-compose coordinates the relationships between the various ROCm software layers, and it remembers flags that should be passed to docker to expose devices and import volumes.
78
+
`./setup` prepares an environment to be controlled with [Docker Compose](https://docs.docker.com/compose/). While docker-compose is not necessary for proper operation, it is highly recommended. setup.sh does provide a flag to simplify the installation of this tool. Docker-compose coordinates the relationships between the various ROCm software layers, and it remembers flags that should be passed to docker to expose devices and import volumes.
79
79
80
80
#### Example of using docker-compose
81
-
docker-compose.yml provides services that build and run containers. YAML is structured data, so it's easy to modify and extend. The *setup.sh* script generates a *.env* file that docker-compose reads to satisfy the definitions of the variables in the .yml file.
81
+
docker-compose.yml provides services that build and run containers. YAML is structured data, so it's easy to modify and extend. The *setup.sh* script generates a *.env* file that docker-compose reads to satisfy the definitions of the variables in the .yml file.
82
82
*`docker-compose run --rm rocm` -- Run container using rocm packages
83
83
*`docker-compose run --rm rocm-from-src` -- Run container with rocm built from source
84
84
@@ -91,7 +91,7 @@ docker-compose.yml provides services that build and run containers. YAML is str
91
91
| rocm | application service defined in **docker-compose.yml**|
92
92
93
93
### rocm-user has root privileges by default
94
-
The dockerfile that serves as a 'terminal' creates a non-root user called **rocm-user**. This container is meant to serve as a development environment (therefore `apt-get` is likely needed), the user has been added to the linux sudo group. Since it is somewhat difficult to set and change passwords in a container (often requiring a rebuild), the password prompt has been disabled for the sudo group. While this is convenient for development to be able `sudo apt-get install` packages, it does imply *lower security* in the container.
94
+
The dockerfile that serves as a 'terminal' creates a non-root user called **rocm-user**. This container is meant to serve as a development environment (therefore `apt-get` is likely needed), the user has been added to the linux sudo group. Since it is somewhat difficult to set and change passwords in a container (often requiring a rebuild), the password prompt has been disabled for the sudo group. While this is convenient for development to be able `sudo apt-get install` packages, it does imply *lower security* in the container.
Copy file name to clipboardExpand all lines: quick-start.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,16 @@
2
2
3
3
The following instructions assume a fresh/blank machine to be prepared for the ROCm + Docker environment; no additional software has been installed other than the typical stock package updating.
4
4
5
-
It is my recommendation to install the rocm kernel first. Depending on how distribution release cycles lines up, the rocm kernel is often newer than the stock kernel shipping in most linux distributions. The newer kernel often supports newer AMD hardware better, and stock video resolutions and hardware acceleration performance are typically improved. As of the time of this writing, ROCm officially supports Ubuntu and Fedora Linux distributions. The following asciicast demonstrates updating the kernel on Ubuntu 14.04. More detailed instructions can be found on the Radeon Open Compute website:
5
+
It is recommended to install the rocm kernel first. Depending on how distribution release cycles lines up, the rocm kernel is often newer than the stock kernel shipping in most linux distributions. The ROCm kernel often supports newer AMD hardware better, and stock video resolutions and hardware acceleration performance are typically improved. As of the time of this writing, ROCm officially supports Ubuntu and Fedora Linux distributions. The following asciicast demonstrates updating the kernel on Ubuntu 14.04. More detailed instructions can be found on the Radeon Open Compute website:
6
6
*[Installing ROCK kernel](https://github.com/RadeonOpenCompute/ROCm#debian-repository---apt-get) on Ubuntu
The following is a sequence of commands to type (or cut-n-paste) into a terminal. Where `<<<tab-complete>>>` is used in the sequence below, it is recommended to complete the string with shell tab completion to auto-complete the latest available rocm kernel:
Make sure to reboot the machine after installing the ROCm kernel package to force the new kernel to load on reboot. You can verify the ROCm kernel is loaded by typing the following command at a prompt:
0 commit comments