-
Notifications
You must be signed in to change notification settings - Fork 845
[Doc] Add documentation for Docker images #4778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
5e54dd2
4093e6a
5ff13fa
1a29acb
20dc963
8063875
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # Docker Containers BKMs | ||
|
|
||
| ## Docker vs Podman | ||
|
|
||
| Docker and Podman are very similar tools, that allow you to manage and run | ||
| container images. Unlike Docker, Podman runs without a daemon, allows you to run | ||
| containers without root permissions, but does not let you build a container from | ||
| source. The command line syntax is mostly identical for Docker and Podman. | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
| Choose whatever is available on your system. | ||
|
|
||
| ## SYCL Containers overview | ||
|
|
||
| The following containers are publicly available for DPC++ compiler development: | ||
|
|
||
| - `ghcr.io/intel/llvm/ubuntu2004_base`: contains basic environment setup for | ||
| building DPC++ compiler from source. | ||
| - `ghcr.io/intel/llvm/ubuntu2004_intel_drivers`: contains everything from base | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
| container + pre-installed Intel drivers. This image provides two main tags: | ||
| `latest`, that uses latest available drivers, and `stable`, that uses | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
| recommended drivers. | ||
| - `ghcr.io/intel/llvm/ubuntu2004_nightly`: contains latest successfully built | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
| nightly build of DPC++ compiler, as well as pre-installed Intel drivers. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this image uses Intel drivers from the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean from CI? I think I can make that possible. Otherwise, Dockerfiles have
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. The scenario I'm thinking about is using CI to build the image, which I can use locally (because I can't or don't want to build the image locally). |
||
|
|
||
| ## Building a Docker Container from scratch | ||
|
|
||
| Docker containers can be build with the following command: | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
|
|
||
| ``` | ||
| docker build -f path/to/devops/containers/file.Dockerfile path/to/devops/ | ||
| ``` | ||
|
|
||
| The `ubuntu2004_preinstalled.Dockerfile` script expects `llvm_sycl.tar.gz` file | ||
| to be present in `devops/` directory. | ||
|
|
||
| Containers other than base provide several configurable arguments, most commonly | ||
| used are`base_image` and `base_tag`, that specify base Docker image and its tag. | ||
| You can set additional arguments with `--build-arg ARG=value` argument. | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Running Docker container interactively | ||
|
|
||
| The main application of Docker is containerizing services. But it also allows | ||
| you to run containers interactively, so that you can use it as you would use a | ||
| terminal or SSH session. The following command allows you to do that: | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
|
|
||
| ``` | ||
| docker run --name <friendly_name> -it --entrypoint /bin/bash <image_name>[:<tag>] | ||
| ``` | ||
|
|
||
| This command will download an image, if it does not exist locally. If you've | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
| downloaded an image previously, and you want to update it, use | ||
| `docker pull <image_name>` command. | ||
|
|
||
| ## Passthrough an Intel GPU to container | ||
|
|
||
| Add `--device=/dev/dri` argument to `run` command to passthrough you Intel GPU. | ||
|
alexbatashev marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Passthrough a directory to container | ||
|
|
||
| Use `-v path/on/host:path/in/container` argument for `run` command to | ||
| passthrough a host directory or a file. | ||
|
|
||
| ## Managing downloaded Docker image | ||
|
|
||
| List local images: | ||
| ``` | ||
| docker image ls | ||
| ``` | ||
|
|
||
| Remove local image: | ||
| ``` | ||
| docker image rm <image_name_or_id> | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bader @vladimirlaz folks, I hope you don't mind