Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sycl/ReleaseNotes.md @pvchupin @tfzhu
sycl/doc/ @pvchupin @bader
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
sycl/doc/SPIRV @AlexeySotkin @bashbaug @mbelicki
sycl/doc/dev @bader @vladimirlaz

Copy link
Copy Markdown
Contributor Author

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


# Sub-groups
sycl/include/CL/sycl/detail/spirv.hpp @Pennycook @AlexeySachkov
Expand Down
11 changes: 11 additions & 0 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ and a wide range of compute accelerators such as GPU and FPGA.
* Windows: `Visual Studio` version 15.7 preview 4 or later -
[Download](https://visualstudio.microsoft.com/downloads/)

Alternatively you can use Docker image, that has everything you need
pre-installed:
Comment thread
alexbatashev marked this conversation as resolved.
Outdated

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

This command will start a terminal session, from which you can proceed with the
instructions below. See [Docker BKMs](dev/DockerBKMs.md) for more info on Docker
commands.

### Create DPC++ workspace

Throughout this document `DPCPP_HOME` denotes the path to the local directory
Expand Down
72 changes: 72 additions & 0 deletions sycl/doc/dev/DockerBKMs.md
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.
Comment thread
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
Comment thread
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
Comment thread
alexbatashev marked this conversation as resolved.
Outdated
recommended drivers.
- `ghcr.io/intel/llvm/ubuntu2004_nightly`: contains latest successfully built
Comment thread
alexbatashev marked this conversation as resolved.
Outdated
nightly build of DPC++ compiler, as well as pre-installed Intel drivers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this image uses Intel drivers from the stable tag. Right?
Is it possible to trigger the build of the container with latest Intel drivers in GitHub Actions manually?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 base_tag argument, so you can build with any tag (i.e. latest or a particular commit hash) locally.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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:
Comment thread
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.
Comment thread
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:
Comment thread
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
Comment thread
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.
Comment thread
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>
```
10 changes: 8 additions & 2 deletions sycl/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Data Parallel C++ Documentation
===============================

Using oneAPI DPC++ for Application Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------------------

.. toctree::
:maxdepth: 1
Expand All @@ -18,7 +18,7 @@ Using oneAPI DPC++ for Application Development
EnvironmentVariables

Developing oneAPI DPC++ Compiler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------------

.. toctree::
:maxdepth: 1
Expand All @@ -41,3 +41,9 @@ Developing oneAPI DPC++ Compiler
SYCLInstrumentationUsingXPTI
ITTAnnotations

Development BKMs
~~~~~~~~~~~~~~~~

.. toctree::
:maxdepth: 1
dev/DockerBKMs