网页
综合
更新时间 2026-11-14 16:51:30
Download and Install Devito
自动蜘蛛
www.devitoproject.org
正文约 4271 字
There are two main approaches to installing Devito.
In order to facilitate the dissemination, usage, and development of Devito, we provide a series of Docker images. These images support numerous architectures and compilers and are tagged accordingly. You can find all the available images at DevitoHub. The following describes the available images and the workflow to build it yourself.
Devito provides several images that target different architectures and compilers. In the following, all images are described as imagename-*. The * corresponds to, and should be swapped for, the different release tags dev, latest or vx.x.x depending on if you are interested in specific versions (vx.x.x), the latest stable release(latest), or the latest development status (dev).
We provide two CPU images: - devito:gcc-* with the standard GNU gcc compiler. - devito:icx-* with the Intel C compiler for Intel architectures.
These images provide a working environment for any CPU architecture and come with Devito, gcc/icx and mpi preinstalled, and utilities such as jupyter for usability and exploration of the package.
To run this image locally, you will first need to install docker. Then, the following commands will get you started:
Alternatively, to run in user context on a cluster with a shared filesystem, you can add the correct user config as docker options, e.g.:
Notes: In addition, the following legacy tags are available:
Second, we provide three images to run Devito on GPUs, tagged devito:nvidia-nvc-*, and devito:amd-*.
To run the NVidia GPU version, you will need nvidia-docker installed and to specify the GPUs to use at runtime with the --gpus flag. See, for example, a few runtime commands for the NVidia nvc images.
or to run in user context on a cluster with a shared filesystem, you can add the correct user config as docker options, e.g.:
Unlike NVidia, AMD does not require an additional Docker setup and runs with the standard docker. You will, however, need to pass some flags so that the image is linked to the GPU devices. You can find a short walkthrough in these AMD notes for their TensorFlow GPU Docker image.
Notes: In addition, the following legacy tags are available:
To build the images yourself, you only need to run the standard build command using the provided Dockerfile. The main difference between the CPU and GPU images will be the base image used.
To build the (default) CPU image, run:
To build the GPU image with openacc offloading and the nvc compiler, run:
or if you wish to use the amdclang compiler with openmp offloading for AMD architectures:
To build the base image yourself locally, you need to run the standard build command using the provided Dockerfile. Following this, we build the Devito image using the previously built base:
and then, to run tests or/and examples using the newly built image
For those aiming to develop in Devito using Docker, you can use docker-compose. We start by cloning the repo and entering the Devito directory.
Devito is available as a pip package in PyPI.
Create a Python virtual environment
Source the newly created venv. This needs to be repeated each time a new terminal is open.
To install the latest Devito release along with any additional dependencies, follow:
latest Devito release
To install the latest Devito development version, without the tutorials, follow:
Additional dependencies:
Note that here, you do not need to get the code via git clone. Depending on your needs, this might also be the recommended setup for using Devito in a production-like environment. However, since some components need to be compiled before use, this approach may be sensitive to the C/C++ compilers present on your system and the related environment, including what other packages you might have installed.
Please install either Anaconda or Miniconda. Once install, you can create a virtual environment with eithera Python virtual environment or a Conda environment:
and finally, install Devito along with any extra dependencies:
and then install the requirements in your virtual environment (venv or conda):
If you are facing any issues, we are happy to help on Slack_. Also, have a look at our list of known installation issues or join us on Slack to interact with the developers and the community.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。