1- .. _docker :
21.. include :: ./../ext_links.txt
32
43Docker Support
54==============
65
7- Numba dpex now delivers docker support.
8- Dockerfile is capable of building numba-dpex as well as direct dependencies for it:
9- dpctl and dpnp.
10- There are several prebuilt images available: for trying numba_dpex and
11- for building numba-dpex.
6+ Numba dpex now delivers docker support. Dockerfile is capable of building
7+ numba-dpex as well as direct dependencies for it: dpctl and dpnp. There are
8+ several prebuilt images available: for trying numba_dpex and for building
9+ numba-dpex.
1210
1311Building
1412--------
1513
16- Numba dpex ships with multistage Dockerfile, which means there are
17- different `targets <https://docs.docker.com/build/building/multi-stage/#stop-at-a-specific-build-stage >`_ available for build. The most useful ones:
14+ Numba dpex ships with multistage Dockerfile, which means there are different
15+ `targets
16+ <https://docs.docker.com/build/building/multi-stage/#stop-at-a-specific-build-stage> `_
17+ available for build. The most useful ones:
1818
19- - runtime
20- - runtime-gpu
21- - numba-dpex-builder-runtime
22- - numba-dpex-builder-runtime-gpu
19+ - `` runtime ``
20+ - `` runtime-gpu ``
21+ - `` numba-dpex-builder-runtime ``
22+ - `` numba-dpex-builder-runtime-gpu ``
2323
2424To build docker image
2525
@@ -36,28 +36,30 @@ To run docker image
3636
3737 .. note ::
3838
39- If you are building docker image with gpu support it will calls github api to get
40- latest versions of intel gpu drivers. You may face Github API call limits. To avoid
41- this, you can pass your github credentials to increase this limit. You can do it
42- by providing
43- ` build args <https://docs.docker.com/engine/reference/commandline/build/#build-arg >`_
44- ``GITHUB_USER `` and ``GITHUB_PASSWORD ``. You can use
45- ` access token <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token> `
39+ If you are building docker image with gpu support it will calls github api
40+ to get latest versions of intel gpu drivers. You may face Github API call
41+ limits. To avoid this, you can pass your github credentials to increase this
42+ limit. You can do it by providing ` build args
43+ <https://docs.docker.com/engine/reference/commandline/build/#build-arg> `_
44+ ``GITHUB_USER `` and ``GITHUB_PASSWORD ``. You can use ` access token
45+ <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token> `_
4646 instead of the password:
4747
4848.. note ::
4949
50- In case you are building docker image behind firewall and your internet access
51- requires proxy, you can provide proxy
52- `build args <https://docs.docker.com/engine/reference/commandline/build/#build-arg >`_
53- ``http_proxy `` and ``https_proxy ``. Please note, that these args must be lowercase.
50+ In case you are building docker image behind firewall and your internet
51+ access requires proxy, you can provide proxy `build args
52+ <https://docs.docker.com/engine/reference/commandline/build/#build-arg> `_
53+ ``http_proxy `` and ``https_proxy ``. Please note, that these args must be
54+ lowercase.
5455
55- Dockerfile supports different python versions. To select the one you want, simply set
56- ``PYTHON_VERSION `` build arg. By default docker image is based on official python image
57- based on slim debian, so the requested python version must be from the available python
58- docker images. In case you want to build on images on custom image you have to pass
59- ``BASE_IMAGE `` environment variable. Be aware that Dockerfile is based on debian so any
60- base image should be debian based, like debian or ubuntu.
56+ Dockerfile supports different python versions. To select the one you want,
57+ simply set ``PYTHON_VERSION `` build arg. By default docker image is based on
58+ official python image based on slim debian, so the requested python version must
59+ be from the available python docker images. In case you want to build on images
60+ on custom image you have to pass ``BASE_IMAGE `` environment variable. Be aware
61+ that Dockerfile is based on debian so any base image should be debian based,
62+ like debian or ubuntu.
6163
6264Build arguments that could be useful:
6365
@@ -90,8 +92,8 @@ Refer to Dockerfile to see all available
9092Running prebuilt images
9193-----------------------
9294
93- An easy way you can try ``numba_dpex `` is by using prebuilt images.
94- There are several prebuilt images available:
95+ An easy way you can try ``numba_dpex `` is by using prebuilt images. There are
96+ several prebuilt images available:
9597
9698- ``runtime `` package that provides runtime experience
9799.. code-block :: text
@@ -103,7 +105,8 @@ There are several prebuilt images available:
103105
104106 ghcr.io/intelpython/numba-dpex/builder:<numba_dpex_version>-py<python_version>[-gpu]
105107
106- - you can also see ``stages `` package, but it is used mostly for building stages.
108+ - you can also see ``stages `` package, but it is used mostly for building
109+ stages.
107110You can use them to build your own docker that is built on top of one of them.
108111
109112To try out numba dpex simply run:
126129
127130 .. note ::
128131
129- If you want to enable GPU you need to pass it within container and use ``*-gpu `` tag.
132+ If you want to enable GPU you need to pass it within container and use
133+ ``*-gpu `` tag.
130134
131135 For passing GPU into container on linux use arguments ``--device=/dev/dri ``.
132- However if you are using WSL you need to pass
133- `` --device=/dev/dxg -v /usr/lib/wsl:/usr/lib/wsl `` instead.
136+ However if you are using WSL you need to pass `` --device=/dev/dxg -v
137+ /usr/lib/wsl:/usr/lib/wsl `` instead.
134138
135- So, for example, if you want to run numba dpex container with GPU support on WSL:
139+ So, for example, if you want to run numba dpex container with GPU support on
140+ WSL:
136141
137142.. code-block :: bash
138143
0 commit comments