Skip to content

Commit 4093e6a

Browse files
committed
update for current images
1 parent 5e54dd2 commit 4093e6a

File tree

2 files changed

+93
-15
lines changed

2 files changed

+93
-15
lines changed

sycl/doc/GetStartedGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ and a wide range of compute accelerators such as GPU and FPGA.
4646
* Windows: `Visual Studio` version 15.7 preview 4 or later -
4747
[Download](https://visualstudio.microsoft.com/downloads/)
4848

49-
Alternatively you can use Docker image, that has everything you need
49+
Alternatively, you can use Docker image, that has everything you need
5050
pre-installed:
5151

5252
```
53-
docker run --name sycl_build -it --entrypoint=/bin/bash -v /local/workspace/dir/:/src ghcr.io/intel/llvm/ubuntu2004_base
53+
docker run --name sycl_build -it -v /local/workspace/dir/:/src ghcr.io/intel/llvm/ubuntu2004_base /bin/bash
5454
```
5555

5656
This command will start a terminal session, from which you can proceed with the

sycl/doc/dev/DockerBKMs.md

Lines changed: 91 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Docker and Podman are very similar tools, that allow you to manage and run
66
container images. Unlike Docker, Podman runs without a daemon, allows you to run
77
containers without root permissions, but does not let you build a container from
8-
source. The command line syntax is mostly identical for Docker and Podman.
8+
the source. The command line syntax is mostly identical for Docker and Podman.
99
Choose whatever is available on your system.
1010

1111
## SYCL Containers overview
@@ -14,27 +14,27 @@ The following containers are publicly available for DPC++ compiler development:
1414

1515
- `ghcr.io/intel/llvm/ubuntu2004_base`: contains basic environment setup for
1616
building DPC++ compiler from source.
17-
- `ghcr.io/intel/llvm/ubuntu2004_intel_drivers`: contains everything from base
18-
container + pre-installed Intel drivers. This image provides two main tags:
19-
`latest`, that uses latest available drivers, and `stable`, that uses
20-
recommended drivers.
21-
- `ghcr.io/intel/llvm/ubuntu2004_nightly`: contains latest successfully built
22-
nightly build of DPC++ compiler, as well as pre-installed Intel drivers.
17+
- `ghcr.io/intel/llvm/ubuntu2004_intel_drivers`: contains everything from the
18+
base container + pre-installed Intel drivers.
19+
- `ghcr.io/intel/llvm/sycl_ubuntu2004_nightly`: contains the latest successfully
20+
built nightly build of DPC++ compiler. The image comes in two flavors:
21+
with pre-installed Intel drivers (`latest`) and without them (`no-drivers`).
2322

2423
## Building a Docker Container from scratch
2524

26-
Docker containers can be build with the following command:
25+
Docker containers can be built with the following command:
2726

2827
```
2928
docker build -f path/to/devops/containers/file.Dockerfile path/to/devops/
3029
```
3130

32-
The `ubuntu2004_preinstalled.Dockerfile` script expects `llvm_sycl.tar.gz` file
31+
The `ubuntu2004_preinstalled.Dockerfile` script expects `llvm_sycl.tar.xz` file
3332
to be present in `devops/` directory.
3433

35-
Containers other than base provide several configurable arguments, most commonly
36-
used are`base_image` and `base_tag`, that specify base Docker image and its tag.
37-
You can set additional arguments with `--build-arg ARG=value` argument.
34+
Containers other than base provide several configurable arguments, the most
35+
commonly used are `base_image` and `base_tag`, which specify the base Docker
36+
image and its tag. You can set additional arguments with `--build-arg ARG=value`
37+
argument.
3838

3939
## Running Docker container interactively
4040

@@ -43,7 +43,7 @@ you to run containers interactively, so that you can use it as you would use a
4343
terminal or SSH session. The following command allows you to do that:
4444

4545
```
46-
docker run --name <friendly_name> -it --entrypoint /bin/bash <image_name>[:<tag>]
46+
docker run --name <friendly_name> -it <image_name>[:<tag>] /bin/bash
4747
```
4848

4949
This command will download an image, if it does not exist locally. If you've
@@ -53,12 +53,46 @@ downloaded an image previously, and you want to update it, use
5353
## Passthrough an Intel GPU to container
5454

5555
Add `--device=/dev/dri` argument to `run` command to passthrough you Intel GPU.
56+
Make sure you're a member of `video` group to be able to access GPU.
5657

5758
## Passthrough a directory to container
5859

5960
Use `-v path/on/host:path/in/container` argument for `run` command to
6061
passthrough a host directory or a file.
6162

63+
## Persisting data with volumes
64+
65+
Docker container images are read-only. When container is destroyed, all its data
66+
is lost. To persist data when working with containers (i.e. when upgrading
67+
container version) one can use Docker volumes.
68+
69+
Creating a volume:
70+
71+
```
72+
docker volume create <volume name>
73+
```
74+
75+
Listing all volumes:
76+
77+
```
78+
docker volume list
79+
```
80+
81+
Mounting volume to the container:
82+
83+
```
84+
docker run <options> -v <volume_name>:/path/inside/container <image_name> bash
85+
```
86+
87+
Deleting a volume:
88+
89+
```
90+
docker volume rm <image_name>
91+
```
92+
93+
See [official documentation](https://docs.docker.com/storage/volumes/) for more
94+
info.
95+
6296
## Managing downloaded Docker image
6397

6498
List local images:
@@ -70,3 +104,47 @@ Remove local image:
70104
```
71105
docker image rm <image_name_or_id>
72106
```
107+
108+
## Change location of the images on the system
109+
110+
By default Docker stores images in `/var/lib/docker`, but that can be changed.
111+
112+
Create a new file called `/etc/docker/daemon.json` and put the following
113+
content:
114+
115+
```
116+
{
117+
"data-root": "/path/to/data/root",
118+
"exec-root": "/path/to/exec/root"
119+
}
120+
```
121+
122+
## Running Docker without sudo
123+
124+
Add your local user to `docker` group to be able to run docker commands without
125+
sudo.
126+
127+
## Changing Docker user
128+
129+
By default all processes inside Docker run as root. Some LLVM or Clang tests
130+
expect your user to be anything but root. You can change the user by specifying
131+
`-u <username or uid>` option. All Docker containers come with user `sycl`
132+
created.
133+
134+
## Managing disk usage
135+
136+
See how much space is taken by docker:
137+
138+
```
139+
docker system df
140+
```
141+
142+
Cleaning unused data:
143+
144+
```
145+
docker system prune
146+
```
147+
148+
See [official documentation](https://docs.docker.com/engine/reference/commandline/system_prune/)
149+
for more info.
150+

0 commit comments

Comments
 (0)